Konstantin Vlasenko

An engineer is someone who can make for a dollar what any fool could make for two. – Alan Kay

Git tips

What is Git Why Git [Read the history - 46:00] Git reference site Pro Git book O’Reilly Webcast: The Fringes of Git (Rebase technique by examples)

HOWTO: arc diff with the particular commit in the past

Create the branch via hash git branch preview 63c3ec098181b81e44a018e153de481c8ed5df7b Switch to new branch git checkout preview Checkout needed files from the original branch git checkout master test.js Commit changes git commit -am “for arc diff” arc diff –preview Now you can delete this branch

AWS EC2: It is not possible to “sniff” traffic that is intended for a different virtual instance

It is not possible for a virtual instance running in promiscuous mode to receive or “sniff” traffic that is intended for a different virtual instance. While customers can place their interfaces into promiscuous mode, the hypervisor will not deliver any traffic to them that is not addressed to them. Even two virtual instances that are [...]

#jQuery. Use the .delegate() instead of .live(). Use .on() instead of .delegate()

As of jQuery 1.7, the .live() method is deprecated. Use .on() to attach event handlers. Users of older versions of jQuery should use .delegate() in preference to .live(). When a selector is provided (.on), the event handler is referred to as delegated. The handler is not called when the event occurs directly on the bound element, but only for descendants (inner elements) that match the [...]

AWS is built for enterprise security standards

Certifications SOC 1 Type 2 (formerly SAS-70) ISO 27001 PCI DSS for EC2, S3, EBC, VPC, RDS, ELB, IAM FISMA Moderate Compliant Controls (Amazon cloud earns key FISMA government security accreditation) HIPAA & ITAR Compliant Architecture Phisical security Datacenters in nondescript facilities Physical access strictly controlled Must pass two-factor authentication at least twice for floor access [...]

O365 components for most plans

K1 – DESKLESSPACK SHAREPOINTDESKLESS EXCHANGE_S_DESKLESS K2 – DESKLESSWOFFPACK SHAREPOINTWAC SHAREPOINTDESKLESS EXCHANGE_S_DESKLESS P1 – LITEPACK MCOLITE SHAREPOINTLITE EXCHANGE_L_STANDARD E1 – STANDARDPACK MCOSTANDARD SHAREPOINTSTANDARD EXCHANGE_S_STANDARD E2 – STANDARDWOFFPACK (?) E3 – ENTERPRISEPACK OFFICESUBSCRIPTION MCOSTANDARD SHAREPOINTWAC SHAREPOINTENTERPRISE EXCHANGE_S_ENTERPRISE E4 – ENTERPRISEWITHSCAL OFFICESUBSCRIPTION MCOSTANDARD SHAREPOINTWAC SHAREPOINTENTERPRISE EXCHANGE_S_ENTERPRISE source: http://blog.c7solutions.com/2011/07/assign-specific-licences-in-office-365.html

[express/connect.static] Set ‘Last-Modified’ to now to avoid 304 Not Modified

Why do I need this? The right answer is: I don’t need that trick! The example below is just to show how to use routes to intercept requests to a static file. Put router before static. app.use(app.router); app.use(express.static(__dirname + ‘/static’)); Add ‘/*’ handler (don’t forget to call next()) app.get(‘/*’, function(req, res, next){ res.setHeader(‘Last-Modified’, (new Date()).toUTCString()); [...]

AWS .NET SimpleDB uses https

So do not be afraid. You are secure. Declaring Type: Amazon.SimpleDB.AmazonSimpleDBConfig Assembly: AWSSDK, Version=1.3.8.0 public AmazonSimpleDBConfig() { this.serviceVersion = “2009-04-15″; this.serviceURL = “https://sdb.amazonaws.com”; this.userAgent = AWSSDKUtils.SDKUserAgent; this.signatureVersion = “2″; this.signatureMethod = “HmacSHA256″; this.proxyPort = -1; this.maxErrorRetry = 3; this.fUseSecureString = true; }

Using PowerShell for common AWS SimpleDB operations

#Create SimpleDB client Add-Type -Path “C:\AWS SDK\1.3.8.0\bin\AWSSDK.dll” $sdb=[Amazon.AWSClientFactory]::CreateAmazonSimpleDBClient(‘Key Id’, ‘Secret Key’) #Create Domain $req = (new-object Amazon.SimpleDB.Model.CreateDomainRequest).WithDomainName(‘Contacts’) $sdb.CreateDomain($req) #List Domains $req = (new-object Amazon.SimpleDB.Model.ListDomainsRequest) $sdb.ListDomains($req) #Insert Item $req = (new-object Amazon.SimpleDB.Model.PutAttributesRequest).WithDomainName(‘Contacts’).WithItemName(‘user1′); $req.Attribute.Add((new-object Amazon.SimpleDB.Model.ReplaceableAttribute).WithName(‘FirstName’).WithValue(‘Konstantin’)) $req.Attribute.Add((new-object Amazon.SimpleDB.Model.ReplaceableAttribute).WithName(‘LastName’).WithValue(‘Vlasenko’)) $sdb.PutAttributes($req) #Query All Items $req = (new-object Amazon.SimpleDB.Model.SelectRequest).WithSelectExpression(‘select * from Contacts’) $sdb.Select($req) #Query Item $req = (new-object Amazon.SimpleDB.Model.SelectRequest).WithSelectExpression(‘select * from [...]

HTML5 chessboard

<html> <head> <script type=”text/javascript” src=”http://code.jquery.com/jquery-1.6.4.min.js”></script> <script type=”text/javascript”> $(document).ready(function () { // draws a chessboard function drawChessboard() { // define the constants var baseX = 0.5, baseY = 0.5, width = 50; // get the 2D context from the “chessboard” canvas var context = document.getElementById(“chessboardCanvas”).getContext(“2d”); // draws the 8 by 8 chessboard for (var i = [...]

Follow

Get every new post delivered to your Inbox.