This file contains hidden or 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
<html><body> | |
<div id="o"></div> | |
<script> | |
// Thread scheduling. | |
var Scheduler = { | |
threads : new Queue(), | |
run : function(context) { | |
Scheduler.threads.insert(context); |
This file contains hidden or 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/bash | |
IPATH="/Applications/iTunes.app/Contents/MacOS" | |
if [ ! -e "$IPATH/iTunesX" ] | |
then | |
sudo mv "$IPATH/iTunes" "$IPATH/iTunesX" | |
# has sudo failed? | |
if (( $? )) |
This file contains hidden or 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
require 'rubygems' | |
require 'hmac-sha1' | |
require 'net/https' | |
require 'base64' | |
s3_access='S3_ACCESS_KEY' | |
s3_secret='S3_SECRET_KEY' | |
cf_distribution='CLOUDFRONT_DISTRIBUTION_ID' | |
if ARGV.length < 1 |
This file contains hidden or 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
require 'rubygems' | |
require 'hmac-sha1' | |
require 'net/https' | |
require 'base64' | |
s3_access='S3_ACCESS_KEY' | |
s3_secret='S3_SECRET_KEY' | |
cf_distribution='CLOUDFRONT_DISTRIBUTION_ID' | |
newobj = ARGV[0] |
This file contains hidden or 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
local = ARGV[0] | |
s3_dest = ARGV[1] | |
if local == nil || s3_dest == nil | |
puts "syntax aws_cf_sync.rb local_source s3_dest" | |
exit | |
end | |
config = "#{Dir.pwd}/s3.config" | |
if !File.exists?(config) |
This file contains hidden or 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
task :default => :server | |
desc 'Start server with --auto' | |
task :server do | |
jekyll('--server --auto') | |
end | |
desc 'Build site with Jekyll' | |
task :build do | |
jekyll('--no-future') |
This file contains hidden or 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/bash | |
OUTFILE=$(mktemp -t syntax) | |
vim +'so $VIMRUNTIME/syntax/hitest.vim' \ | |
+'let html_use_css=1' \ | |
+'TOhtml' \ | |
+'v/^\./d' \ | |
+"wq! $OUTFILE" \ | |
+'q!' &>/dev/null |
This file contains hidden or 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/bash | |
OUTFILE=$(mktemp -t highlight) | |
INFILE=$1 | |
PARAM="set nonumber" | |
if [ -z "$INFILE" ] | |
then | |
echo "usage: $0 source.file" |
This file contains hidden or 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
Haskell (ghci) | |
Types de base | |
2 | |
2 + 3.0 | |
False | |
True == False |
This file contains hidden or 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
require 'socket' | |
# request through ruby TCPSocket | |
s = TCPSocket.open 'localhost', 4567 | |
s.write "GET / HTTP/1.0\r\n\r\n" | |
s.read | |
s.close | |
OlderNewer