View sh200.headers.txt
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
Remote Address:199.27.79.184:80 | |
Request URL:http://s7.addthis.com/static/r07/sh200.html | |
Request Method:GET | |
Status Code:304 Not Modified | |
Request Headers | |
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 | |
Accept-Encoding:gzip, deflate, sdch | |
Accept-Language:en-GB,en;q=0.8,en-US;q=0.6 | |
Cache-Control:max-age=0 |
View application.js.coffee
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
Shepherd.on 'show', (o) -> | |
el = $(o.step.options.attachTo.element).first() | |
width = el.outerWidth() + 10 | |
height = el.outerHeight() + 10 | |
offset = el.offset() | |
$('.shep-overlay').show().css({ | |
position: 'absolute', | |
width: width, | |
height: height, |
View a.rb
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 'mongoid' | |
Mongoid.configure do |config| | |
config.connect_to('test') | |
end | |
class Room | |
include Mongoid::Document | |
has_one :table, as: :parent, autobuild: true |
View commands.sh
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
# Run locally | |
$ SPROCKETS_NON_DIGEST=true RAILS_ENV=production rake assets:precompile | |
# Heroku setup | |
$ heroku labs:enable user-env-compile | |
$ heroku config:add SPROCKETS_NON_DIGEST=true |
View gist:2891715
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
sg@max:/tmp/UnixBench$ ./Run | |
gcc -o ./pgms/arithoh -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Darithoh ./src/arith.c | |
gcc -o ./pgms/register -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum='register int' ./src/arith.c | |
gcc -o ./pgms/short -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=short ./src/arith.c | |
gcc -o ./pgms/int -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=int ./src/arith.c | |
gcc -o ./pgms/long -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=long ./src/arith.c | |
gcc -o ./pgms/float -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=float ./src/arith.c | |
gcc -o ./pgms/double -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=double ./src/arith.c | |
gcc -o ./pgms/hanoi -DTIME -Wall -pedantic -ansi -O2 -fomi |
View gist:2891714
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
sg@max:/tmp/UnixBench$ ./Run | |
gcc -o ./pgms/arithoh -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Darithoh ./src/arith.c | |
gcc -o ./pgms/register -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum='register int' ./src/arith.c | |
gcc -o ./pgms/short -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=short ./src/arith.c | |
gcc -o ./pgms/int -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=int ./src/arith.c | |
gcc -o ./pgms/long -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=long ./src/arith.c | |
gcc -o ./pgms/float -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=float ./src/arith.c | |
gcc -o ./pgms/double -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=double ./src/arith.c | |
gcc -o ./pgms/hanoi -DTIME -Wall -pedantic -ansi -O2 -fomi |
View hydra.rb
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
ruby-1.9.2-p180 :033 > Benchmark.measure { urls.each {|u| req = Typhoeus::Request.new(u); req.on_complete {|resp| puts [resp.code, resp.body.size].map(&:to_s).join(', ') }; hydra.queue(req) }; hydra.run } | |
301, 242 | |
302, 352 | |
301, 337 | |
302, 0 | |
301, 0 | |
200, 3291 | |
301, 350 | |
301, 178 | |
301, 417 |
View mini_pca.rb
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 'ruby-svd' | |
class MiniPca | |
def self.go | |
var_count = 300 | |
doc_count = 100 | |
m = SVDMatrix.new(doc_count, var_count) | |
doc_count.times do |n| |
View tha_jesus.txt
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
ra:~ ryan$ nl scope.c | |
1 int main() { | |
2 int c = 0; | |
3 if (1) { | |
4 int i = 0; | |
5 } | |
6 c = 5; | |
7 i = 10; |
View url_regex.rb
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
# From @gruber http://daringfireball.net/2010/07/improved_regex_for_matching_urls | |
UrlRegex = /\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/?)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s\`!()\[\]{};:\'\".,<>?«»“”‘’]))/i |