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
| body { | |
| white-space: pre; | |
| font-family: monospace; | |
| background: #1D1D1D; | |
| color: #FFFFFF | |
| } | |
| body li, body div { | |
| border: 1px solid transparent; | |
| } |
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 state_from_lat_lng(from_lat, from_lng) | |
| State.where(:abbreviation => "TX") | |
| end |
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
| require 'action_dispatch/middleware/session/redis_store' | |
| ActionDispatch::Session::RedisStore.class_eval do | |
| def set_cookie(env, session_id, cookie) | |
| request = ActionDispatch::Request.new(env) | |
| request.cookie_jar[key] = cookie | |
| end | |
| end |
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
| # Usage: | |
| # $ cap last_release | |
| # Thu, Dec 27, 2012 at 9:47am +0000 | |
| task :last_release do | |
| puts DateTime.parse(latest_release.split('/')[-1]).strftime('%a, %b %d, %Y at %l:%M%P %z').squeeze(' ') | |
| end |
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
| body { | |
| white-space: pre; | |
| font-family: monospace; | |
| background: #1D1D1D; | |
| color: #FFFFFF; | |
| } | |
| body li, body div { | |
| border: 1px solid transparent; | |
| } |
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
| /**********************************************/ | |
| /* | |
| /* Solarized Dark Skin by François Robichet - 2012 | |
| /* | |
| /* Based on Solarized Dark Skin by Mark Osborne: | |
| /* https://gist.github.com/1245727 | |
| /* | |
| /* Inspired by Darcy Clarke's blog post: | |
| /* http://darcyclarke.me/design/skin-your-chrome-inspector/ | |
| /* |
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
| javascript:var buttons=document.getElementsByClassName('uiButtonText');var add_buttons=new Array;for(var b=0;b<buttons.length;b++){if(buttons[b].innerText=='Add'){add_buttons.push(buttons[b])}};for(var b=0;b<add_buttons.length;b++){add_buttons[b].click()}; |
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
| class Person | |
| attr_accessor :name | |
| def initialize(name) | |
| @name = name | |
| end | |
| def love(subject, duration) | |
| "#{self} #{__method__} #{subject} #{duration}" | |
| end |
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
| require 'irb/completion' | |
| require 'irb/ext/save-history' | |
| ARGV.concat [ "--readline", | |
| "--prompt-mode", | |
| "simple" ] | |
| # 1500 entries in the list | |
| IRB.conf[:SAVE_HISTORY] = 1500 |