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
### Keybase proof | |
I hereby claim: | |
* I am samsonasu on github. | |
* I am samsonasu (https://keybase.io/samsonasu) on keybase. | |
* I have a public key ASD1cOpPEfwMx1ip4JX2Skyx_Uw6gSJfC9CXgrb_vKCEaQo | |
To claim this, I am signing this object: |
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
# https://github.com/thoughtbot/paperclip/pull/2435/files | |
module Paperclip | |
class AdapterRegistry | |
def unregister(handler_class) | |
@registered_handlers.reject! { |_, klass| klass == handler_class } | |
end | |
end | |
end |
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
class TestMailer < ActionMailer::Base | |
def notify_irc | |
puts "This is a test" | |
binding.pry | |
mail(subject: "Test", body: "body") | |
end | |
end | |
### | |
[3] pry(main)> TestMailer.notify_irc | |
This is a test |
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
#import "AppVersion.h" | |
#import <Cordova/CDVPluginResult.h> | |
@implementation AppVersion | |
- (void)getVersionNumber:(CDVInvokedUrlCommand*)command | |
{ | |
NSString* callbackId = command.callbackId; | |
NSString* version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; |
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
# This might be too fancy | |
serializer = Class.new(CarePathStageSerializer) do | |
@@patient_care_path = nil | |
def initialize(object, options={}) | |
super(object, options) | |
@patient_care_path = @@patient_care_path | |
end | |
def self.current_patient_care_path=(pcp) | |
@@patient_care_path = pcp |
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
node = Bitcoin::Network::Node.new({ | |
network: :dogecoin, | |
:log => { | |
:network => :debug, | |
:storage => :debug, | |
} | |
}) | |
node.run |
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
DEBUG storage: new block 32fe3927752fd3277edb3ff007573086b73dd0ce31eeeb51ca5c770361397d0b | |
DEBUG storage: validating block syntax 32fe3927752fd3277edb3ff007573086b73dd0ce31eeeb51ca5c770361397d0b (215 bytes) | |
WARN network: ValiationError storing block 32fe3927752fd3277edb3ff007573086b73dd0ce31eeeb51ca5c770361397d0b: block error: syntax check 2 - bits failed | |
DEBUG storage: new block 5453671a92f6f32c52e191f9801e3a4c44562f4edbe5952abf8b46adfc6bde98 | |
DEBUG storage: validating block syntax 5453671a92f6f32c52e191f9801e3a4c44562f4edbe5952abf8b46adfc6bde98 (215 bytes) | |
WARN network: ValiationError storing block 5453671a92f6f32c52e191f9801e3a4c44562f4edbe5952abf8b46adfc6bde98: block error: syntax check 2 - bits failed | |
DEBUG storage: new block e9c9bfb156b755d3efab4e45c449f11567af3e82df50d6099b8dffe214649087 | |
DEBUG storage: validating block syntax e9c9bfb156b755d3efab4e45c449f11567af3e82df50d6099b8dffe214649087 (215 bytes) | |
WARN network: ValiationError storing block e9c9bfb156b755d3efab4e45c449f11567af3e82df50d6099b8dffe214 |
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
Xandra:rails bsamson$ rvm install ruby-1.9.3-p484 | |
Searching for binary rubies, this might take some time. | |
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p484. | |
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. | |
Checking requirements for osx. | |
Error: No available formula for gcc46 | |
Installing requirements for osx. | |
Updating system........ | |
Error running 'requirements_osx_brew_update_system ruby-1.9.3-p484', | |
please read /Users/bsamson/.rvm/log/1386126262_ruby-1.9.3-p484/update_system.log |
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
class CurrentSession | |
attr_reader :session | |
def initialize(session) | |
session[:user] ||= { } # Create a session for user if it isn't already present | |
@session = session | |
end | |
def logged_in? | |
session[:user].present? |
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
class Mockingbird < ActiveRecord::Base | |
attr_accessible :color | |
def chirp! | |
"chirp" | |
end | |
def tweet! | |
"tweet" | |
end |