[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());Continue reading “[express/connect.static] Set ‘Last-Modified’ to now to avoid 304 Not Modified”

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 * fromContinue reading “Using PowerShell for common AWS SimpleDB operations”