Skip to content

Instantly share code, notes, and snippets.

View sarogers's full-sized avatar
🎗️

Spencer Rogers sarogers

🎗️
View GitHub Profile
def foo
x = 42
y = 1337
p = Proc.new do
return x
end
p.call
# https://jwt.io/
#
# 1. Base64 encoding
# 2. JWTs
# 3. 2Learn JWT (WIP)
require 'jwt'
require 'base64'
require 'openssl'
@sarogers
sarogers / capital2snake.sh
Last active December 20, 2017 22:30
Capital case to snake case.
function capital2snake {
echo $(echo $1 | sed -r 's/([A-Z])/_\L\1/g' | sed '1s/^.//')
}
capital2snake FooBarBaz # => foo_bar_baz

Keybase proof

I hereby claim:

  • I am spencer1248 on github.
  • I am sar (https://keybase.io/sar) on keybase.
  • I have a public key ASBRWjY6cVMZlCmVzl6X5s1gm48E7sGvurcWngPC5WSkBwo

To claim this, I am signing this object:

[18:44:46] ~/code/oss/slim on master
>> bundle exec rake bench slow=1 iterations=1000
/Users/spencer1248/.rvm/rubies/ruby-2.2.1/bin/ruby benchmarks/run-benchmarks.rb
Calculating -------------------------------------
(1) erb 8.785k i/100ms
(1) erubis 10.457k i/100ms
(1) fast erubis 9.821k i/100ms
(1) temple erb 7.342k i/100ms
(1) slim pretty 3.516k i/100ms
(1) slim ugly 10.595k i/100ms
#!/bin/bash
if [ "$1" == "" ] || [ "$2" == "" ]; then
echo "USAGE: merge_deploy repo-name batch [batch2]..."
exit 0
fi
repoName=$1
git clone git@github.com:learn-co-curriculum/$repoName.git &&
#!/bin/bash
repoName=$1
git clone git@github.com:learn-co-curriculum/$repoName.git &&
cd $repoName &&
git remote add 000 git@github.com:learn-co-students/$repoName-000.git &&
git remote add 001 git@github.com:learn-co-students/$repoName-001.git &&
git pull 000 master &&
git push 000 master &&
sudo ifconfig eth0 192.168.1.2 netmask 255.255.255.0
telnet 192.168.1.1
mount_root
mtd -r erase rootfs_data
@sarogers
sarogers / best-spam-ever
Created July 8, 2015 21:29
this has got to be ironic
FROM THE DESK OF THE EXECUTIVE DIRECTOR;
FEDERAL BUREAU OF INVESTIGATION FBI.WASHINGTON DC.
Dear Beneficiary
We hope this notification arrives meeting your good health and mind. (FBI) Washington, DC in conjunction with some other relevant investigation agencies here in the United STATES of America have
recently been informed through our Global intelligence monitoring network that you have an over-due payment in tone of USD 10.3M Citib12ank. It might interest you to know that we have taken our time in
screening through this project as stipulated on our protocol of operation and have finally confirmed that your payment/transaction with Citibank is 100% genuine and hitch free from all facets and of which you have the lawful right to claim your fund without any further delay. Having said all this, we will further advise that you go ahead
in dealing with the Citibank, AL accordingly as we will be monitoring all their activities with you as well as your correspondence at all levels.
NOTE: There are numerous scam em
development:
adapter: postgresql
database: ironboard_development
pool: 5
timeout: 5000
encoding: unicode
test:
adapter: postgresql
database: ironboard_test