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
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
<style> | |
body, table { | |
font-family: verdana; | |
font-size: 8pt; | |
} | |
table, td { |
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
$ time ruby test.rb | |
10000 | |
20000 | |
... | |
1000000 | |
real 0m23.596s | |
user 0m23.354s | |
sys 0m0.172s |
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
-module(main). | |
-behaviour(gen_event). | |
-export([ | |
start/0, | |
init/1, | |
code_change/3, | |
handle_call/2, | |
handle_event/2, |
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
require 'net/http' | |
loop do | |
response = Net::HTTP.get_response URI.parse('http://www.google.com/') rescue nil | |
if response && response['Location'].start_with?('http://192.168.2.1:8000') | |
puts "#{Time.now} - Logging in..." | |
Net::HTTP.post_form URI.parse('http://192.168.2.1:8000'), { auth_user: '001', auth_pass: '001', redirurl: 'http://www.google.com/', accept: 'Continue' } | |
end | |
sleep 60 | |
end |
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
loop do | |
x = rand(999) | |
y = loop do | |
`say -r 150 -v Kyoko #{x}` | |
y = gets.to_i | |
break y unless y == 0 | |
end | |
if x == y | |
puts ":-)" | |
else |
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
require 'formula' | |
class Clang < Formula | |
homepage 'http://llvm.org/' | |
url 'http://llvm.org/releases/3.3/cfe-3.3.src.tar.gz' | |
sha1 'ccd6dbf2cdb1189a028b70bcb8a22509c25c74c8' | |
end | |
class ClangToolsExtra < Formula | |
homepage 'http://llvm.org/' |
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
rspec my_spec.rb -r ./junit.rb -f JUnit -o results.xml |
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/bash | |
function dump() { | |
echo "digraph homebrew {" | |
for pkg in `brew list`; do | |
for dep in `brew deps --1 $pkg`; do | |
echo "\"$pkg\" -> \"$dep\";" | |
done | |
done | |
echo "}" |
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
require 'formula' | |
class Libtask < Formula | |
homepage 'http://swtch.com/libtask/' | |
url 'http://swtch.com/libtask.tar.gz' | |
sha1 '3873d8b53d386e7d6baecf99310ae3c3f6e8d066' | |
version 'latest' | |
def install | |
inreplace 'Makefile', '/usr/local', prefix |
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
require 'formula' | |
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook | |
# /usr/local/Library/Contributions/example-formula.rb | |
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST! | |
class Pcl < Formula | |
homepage '' | |
url 'http://xmailserver.org/pcl-1.12.tar.gz' | |
sha1 'a206c8fb5a96e65005f414ac46aeccd4b3603c8d' |
OlderNewer