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 http = require('http'); | |
var qs = require('querystring'); | |
/* Host / Port configuration. | |
Defaults to listening on all interfaces, port 80. | |
*/ | |
var host = "0.0.0.0"; | |
var port = 80; | |
http.createServer(function (req, res) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd"> | |
<!-- This goes in /Users/<username>/Library/Keyboard Layouts/daskeyboard.keylayout --> | |
<!-- Select it by checking the Das Keyboard option in System Preferences -> Languages & Text -> Input Sources --> | |
<keyboard group="0" id="2" name="Das Keyboard - UK" maxout="1"> | |
<layouts> | |
<layout first="0" last="0" modifiers="commonModifiers" mapSet="ANSI"/> | |
</layouts> | |
<modifierMap id="commonModifiers" defaultIndex="0"> | |
<keyMapSelect mapIndex="0"> |
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
import sys | |
from boto.ec2.connection import EC2Connection | |
from boto.exception import BotoServerError | |
AMZN_ACCESS_KEY = "" | |
AMZN_SECRET_KEY = "" | |
maintenance_instances = [] | |
""" Get EC2 connection """ |
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
<?php | |
/** | |
* Some basic connectivity tests for a memcache server. | |
* | |
* $host string Memcache server address to connect to | |
* $port int Memcache server port | |
* $key string A key for setting a test value | |
* $var string A test value to be set | |
*/ |
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
<?php | |
/** | |
* Neologism | |
* Mash a selected word into dictionary words, | |
* sort into a list for perusal. Not terribly memory friendly. | |
* | |
* @arg string $word The word to be mashed. | |
* @arg string $end_part The end part of the word to start the mashing from. | |
*/ |
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/env python | |
import uuid | |
import time | |
import sys | |
import getopt | |
def main(): | |
try: | |
opts, args = getopt.getopt(sys.argv[1:], "fd:v", ["files=", "directory="]) |
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
<?php | |
$base = "http://169.254.169.254/latest/"; | |
$metadata = array("instance-id", "hostname", "instance-type", "public-hostname", "security-groups", | |
"ami-id", "ami-launch-index", "ami-manifest-path", "kernel-id","mac","reservation-id" | |
); | |
echo "<style>td{white-space:nowrap;}</style>"; | |
echo "<table>"; | |
foreach ($metadata as $info) { |
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
# -*- encoding: utf-8 -*- | |
lib = File.expand_path('../lib/', __FILE__) | |
$:.unshift lib unless $:.include?(lib) | |
Gem::Specification.new do |s| | |
s.name = "shlint" | |
s.version = "0.1.1" | |
s.platform = Gem::Platform::RUBY | |
s.authors = ["Ross Duggan"] | |
s.email = ["[email protected]"] |
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
exceptions = [] | |
tree = {} | |
ObjectSpace.each_object(Class) do |cls| | |
next unless cls.ancestors.include? Exception | |
next if exceptions.include? cls | |
exceptions << cls | |
cls.ancestors.delete_if {|e| [Object, Kernel].include? e }.reverse.inject(tree) {|memo,cls| memo[cls] ||= {}} | |
end | |
indent = 0 |
OlderNewer