⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
wget -O /opt/cw.zip http://ec2-downloads.s3.amazonaws.com/cloudwatch-samples/CloudWatchMonitoringScripts-v1.1.0.zip | |
unzip /opt/cw.zip -d /opt/ | |
rm -f /opt/cw.zip | |
yum install -y openssl openssl-devel perl-ExtUtils-MakeMaker | |
curl -L http://cpanmin.us | perl - --self-upgrade | |
cpanm Digest::SHA Bundle::LWP5_837 LWP LWP::Protocol::https | |
IAM_ROLE=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/` | |
DISK_PARAM=`mount |grep -E '[s|xv]d|mapper' | awk '{print "--disk-path="$3}' | tr '\n' ' '` |
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
/* This is a Mono tool, for checking if an SSLv3 | |
* certificate can be used for Server validation | |
* during an SSLv3 handshake | |
* | |
* Compile with: | |
* gmcs -r:Mono.Security certcheck.cs | |
* | |
* Usage: | |
* mono certcheck.exe /path/to/acertfile.cer | |
* */ |
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 | |
PARALLEL_CONNECTS = 10, | |
http = require('http'), | |
sys = require('sys'), | |
connectionCount = 0, | |
messageCount = 0; | |
lastMessages = 0; | |
function addClient() { |
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
/* | |
Here's some documentation on XMLHttpRequest Level 1 and 2 as per the | |
standard and as per implementation. | |
XHR | |
http://www.w3.org/TR/XMLHttpRequest/ | |
http://developer.apple.com/internet/webcontent/xmlhttpreq.html | |
http://msdn.microsoft.com/en-us/library/ms535874%28VS.85%29.aspx | |
XHR2 |
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
Feature: AMQP capacity | |
To make sure the rest of the system is in order | |
Our message queues must not be backed up | |
Scenario: Check queue status | |
Given I have a AMQP server on example.com | |
And I want to check on the fork queue | |
Then it should have less than 400 messages | |
Then it should have at least 5 consumers | |
Then it should have less than 50 messages per consumer |
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 | |
PARALLEL_CONNECTS = 10, | |
http = require('http'), | |
sys = require('sys'), | |
connectionCount = 0, | |
messageCount = 0; | |
lastMessages = 0; | |
function addClient() { |
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
#!/bin/sh | |
#################################### | |
# Output file for HTML5 video # | |
# Requirements: # | |
# - handbrakecli # | |
# - ffmpeg # | |
# - ffmpeg2theora # | |
# # | |
# usage: # |
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
User's session has a fixed size pool of tokens. New token is generated every X minutes and becomes invalid every Y minutes. You always return the most recent one and check against all tokens you have. | |
token_valid = 180 min | |
create_new_token_every = 60 min | |
size = 3 | |
pool = [] // your session pool | |
current_version = '1' | |
getToken = function() { |
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
package main | |
import ( | |
"code.google.com/p/plotinum/plot" | |
"code.google.com/p/plotinum/vg" | |
"code.google.com/p/plotinum/vg/veceps" | |
"math/rand" | |
) | |
func main() { |
OlderNewer