Skip to content

Instantly share code, notes, and snippets.

Ryan Angilly ryana

Block or report user

Report or block ryana

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ryana
ryana / sh200.headers.txt
Created Feb 21, 2015
Southwest WIFI Hacking lingers on...
View sh200.headers.txt
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
@ryana
ryana / application.js.coffee
Created Aug 27, 2014
Pretty spotlighting for shepherd.js
View application.js.coffee
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,
@ryana
ryana / a.rb
Last active Aug 29, 2015 — forked from ahoward/3.1.6.txt
View a.rb
require 'mongoid'
Mongoid.configure do |config|
config.connect_to('test')
end
class Room
include Mongoid::Document
has_one :table, as: :parent, autobuild: true
@ryana
ryana / commands.sh
Created Jul 21, 2013
Monkey patch Sprockets so that non-digest assets will be generated when ENV['SPROCKETS_NON_DIGEST'] is present
View commands.sh
# 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
@ryana
ryana / gist:2891715
Created Jun 7, 2012
UnixBench on our SoftLayer box
View gist:2891715
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
@ryana
ryana / gist:2891714
Created Jun 7, 2012
UnixBench on our SoftLayer box
View gist:2891714
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
@ryana
ryana / hydra.rb
Created Oct 7, 2011
hydra is hawt
View hydra.rb
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
@ryana
ryana / mini_pca.rb
Created Sep 27, 2011
ruby-svd seg fault
View mini_pca.rb
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|
@ryana
ryana / tha_jesus.txt
Created Sep 12, 2011
do not fuck with
View tha_jesus.txt
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;
@ryana
ryana / url_regex.rb
Created Aug 8, 2011
@gruber's improved regex for matching URLs written in Ruby
View url_regex.rb
# 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
You can’t perform that action at this time.