https://stripe.com/docs/api/ruby#create_customer
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
#!/usr/bin/env ruby | |
# A sneaky wrapper around Rubocop that allows you to run it only against | |
# the recent changes, as opposed to the whole project. It lets you | |
# enforce the style guide for new/modified code only, as opposed to | |
# having to restyle everything or adding cops incrementally. It relies | |
# on git to figure out which files to check. | |
# | |
# Here are some options you can pass in addition to the ones in rubocop: | |
# |
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
#!/usr/bin/env ruby | |
# A sneaky wrapper around Rubocop that allows you to run it only against | |
# the recent changes, as opposed to the whole project. It lets you | |
# enforce the style guide for new/modified code only, as opposed to | |
# having to restyle everything or adding cops incrementally. It relies | |
# on git to figure out which files to check. | |
# | |
# Here are some options you can pass in addition to the ones in rubocop: | |
# |
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
# A basic Rails-like Flash implementation built upon Lotus::Action::Session. | |
# Based upon Rack-flash: | |
# https://github.com/nakajima/rack-flash | |
module Flash | |
def self.included(action) | |
action.class_eval do | |
# We rely on features provided by Lotus::Action::Session so let's include | |
# it right here | |
include Lotus::Action::Session |
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
#!/usr/bin/env ruby | |
module Spreedsheet | |
module ColumnNotation | |
def seed | |
@seed ||= ('A'..'Z').to_a | |
end | |
def position_to_column_notation(num, minus = 0) | |
m = num.divmod(seed.size) |
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
# from: http://www.rdoxenham.com/?p=259 | |
# Mine is Model Identifier: MacBookPro8,3 | |
system_profiler -detailLevel mini | grep "Model Identifier:" | |
cd /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources | |
sudo mv MacBookPro8_3.plist ~/Desktop | |
sudo reboot now |
NewerOlder