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 SessionController | |
before_filter :force_ssl, :only => :create | |
# login | |
def new | |
end | |
# login | |
def create |
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 StoryboardDelegate | |
def application(application, didFinishLaunchingWithOptions:launchOptions) | |
storyboard = UIStoryboard.storyboardWithName("Storyboard", bundle: NSBundle.mainBundle) | |
viewController = storyboard.instantiateViewControllerWithIdentifier("Start") | |
if self.respond_to?("initializeRootViewController:forApplication:launchedWithOptions:") | |
viewController = initializeRootViewController(viewController, forApplication:application, launchedWithOptions:launchOptions) | |
end | |
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) |
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
Sell and Distribute Custom B2B Apps to Business Customers | |
You can offer custom B2B apps directly to your business customers who have a Volume Purchase Program account. A custom B2B app provides a unique, tailored solution to address a specific business need or requirement. | |
Some features of a custom B2B app can include: | |
A personalized UI including company logo or branding | |
Unique capabilities specific to a business process or workflow | |
Extra privacy protection to handle sensitive data | |
A specific configuration to meet the customer’s server/back-office environment or IT environment | |
Features targeting a limited audience, such as a business partner, dealer, or franchise | |
You can define the price for the custom B2B app according to the guidelines provided in the latest price schedule. The minimum price for a custom B2B app is $9.99. |
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
<iframe width="560" height="315" src="http://www.youtube.com/embed/4oTMY-KPb0o" frameborder="0" allowfullscreen=true></iframe> |
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
private String[] getAuthenticationParameters() throws NoSuchAlgorithmException { | |
String[] parameters = { "", "" }; | |
MessageDigest md = MessageDigest.getInstance("MD5"); | |
String timestamp = String.valueOf(java.lang.System.currentTimeMillis()); | |
String keyWithTimestamp = timestamp.concat(Constants.RPC.Services.API_KEY); | |
// Let's generate a hex representation of the hash | |
// http://stackoverflow.com/a/421696 | |
md.reset(); |
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
source :rubygems | |
gem "ffi" | |
gem "ffi-rzmq" |
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
Yo boys Jude-la dont-u make it bad-la | |
Take-la a sad-la song-u and-la make it better-u | |
Remember-u to let-u her-u into-u your heart-u | |
Then-u you can-u start-u to make it better-u | |
Why this kolaveri kolaveri kolaveri di! | |
Yo boys Jude-la dont-u be afraid-la | |
You were made-la to go-u out-u and-la get-u her-u | |
The minute-la you let-u her-u under-u your skin-u | |
Then-u you begin-u to make it better-u |
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: http://refactormycode.com/codes/1252-bluetooth-device-class | |
class Device | |
@@devices = {} | |
def self.new mac, *args | |
@@devices[mac] ||= super | |
end | |
MAC_PATTERN = /(?:[0-9a-f]{2}\:){5}[0-9a-f]{2}/ |
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
Miranda ~/Code/Sandbox/ussd-renderer-redux % sw_vers | |
ProductName: Mac OS X | |
ProductVersion: 10.7 | |
BuildVersion: 11A511 | |
Miranda ~/Code/Sandbox/ussd-renderer-redux % ruby -v | |
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.0] | |
Seems to be similar to (if not solved by): https://github.com/ruby/ruby/commit/be953b4d1ce3f0dfc7f24c84ec7a51e027102557 |
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
wc -l 14.csv = 7631928 | |
wc -l base.csv = 1000000 | |
Bitmap: | |
ruby -rubygems fast_filter_shell.rb add --engine bitmap 14.csv 556.92s user 152.28s system 63% cpu 18:41.26 total | |
ruby -rubygems fast_filter_shell.rb filter --engine bitmap base.csv 73.79s user 20.08s system 67% cpu 2:18.51 total | |
Space: 570MB (constant) |