This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var biggestHeight = "0"; | |
// Loop through elements children to find & set the biggest height | |
$(".container *").each(function(){ | |
// If this elements height is bigger than the biggestHeight | |
if ($(this).height() > biggestHeight ) { | |
// Set the biggestHeight to this Height | |
biggestHeight = $(this).height(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).height() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Put message to S3. | |
var aws = require('aws-sdk'); | |
aws.config.update({ | |
accessKeyId: 'accessKeyId', | |
secretAccessKey: 'secretAccessKey', | |
region: 'us-east-1' | |
}); | |
var s3 = new aws.S3(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Setup and Teardown | |
// ================== | |
// | |
// Jasmine [Setup and Teardown] examples. | |
// | |
// [Setup and Teardown]: http://jasmine.github.io/2.0/introduction.html#section-Setup_and_Teardown | |
// Specific to Firefox only. | |
function watchHandler(prop, oldVal, newVal) { | |
console.log(prop + ' changed from ' + oldVal + ' to ' + newVal); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Amazon SNS HTTP Endpoint | |
// ======================== | |
// | |
// A simple Amazon SNS HTTP endpoint server that subscribe to a topic and show | |
// request and response logs related to Amazon SNS activities. | |
// | |
// > (c) 2014 Chao Huang <chao@realguess.net> | |
var http = require('http'); | |
var https = require('https'); // HTTPS is needed for Amazon SNS subscription. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Authorize or revoke the public IP address of the current machine on all AWS | |
# security groups. | |
# | |
# Usage: | |
# | |
# # Authorize TCP port 22 access on all security groups: | |
# aws-security-group authorize 22 us-east-1 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Days Passed Since New Year | |
// ========================== | |
// | |
// (c) 2013 Chao Huang <chao@realguess.net> | |
// Quick Example | |
// ------------- | |
function days() { | |
return (new Date(new Date().toISOString().substr(0,10)).getTime() - new Date('' + new Date().getFullYear()).getTime()) / (1000 * (60 * 60 * 24)); | |
} |
NewerOlder