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
| def foo | |
| x = 42 | |
| y = 1337 | |
| p = Proc.new do | |
| return x | |
| end | |
| p.call | |
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
| # https://jwt.io/ | |
| # | |
| # 1. Base64 encoding | |
| # 2. JWTs | |
| # 3. 2Learn JWT (WIP) | |
| require 'jwt' | |
| require 'base64' | |
| require 'openssl' |
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
| function capital2snake { | |
| echo $(echo $1 | sed -r 's/([A-Z])/_\L\1/g' | sed '1s/^.//') | |
| } | |
| capital2snake FooBarBaz # => foo_bar_baz |
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
| [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 |
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 | |
| 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 && |
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 | |
| 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 && |
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
| sudo ifconfig eth0 192.168.1.2 netmask 255.255.255.0 | |
| telnet 192.168.1.1 | |
| mount_root | |
| mtd -r erase rootfs_data |
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
| 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 |
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
| development: | |
| adapter: postgresql | |
| database: ironboard_development | |
| pool: 5 | |
| timeout: 5000 | |
| encoding: unicode | |
| test: | |
| adapter: postgresql | |
| database: ironboard_test |
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
| module Roleable | |
| extend ActiveSupport::Concern | |
| included do | |
| has_many :roles, through: :user_roles | |
| has_many :actions, through: :roles | |
| end | |
| end |
NewerOlder