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
| /** | |
| * Adam Theme / Dark Theme | |
| * Standard Layout for Spotify Client | |
| * Defines the basic styles for an app | |
| * @copyright 2011 by Spotify | |
| */ | |
| /** | |
| * Declarations for Adam Theme | |
| * |
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
| document.addEventListener("DOMContentLoaded", function() { | |
| var tellerConnect = TellerConnect.setup({ | |
| applicationId: "your_app_id", | |
| skipPicker: true, | |
| onInit: function() { | |
| document.querySelector("button.teller-connect").addEventListener("click", function() { | |
| tellerConnect.open({institution: "chase"}) | |
| }) | |
| }, | |
| onSuccess: function(enrollment) { |
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 "net/https" | |
| require "time" | |
| require "base64" | |
| require "uri" | |
| require "securerandom" | |
| # Load your private key | |
| pkey = OpenSSL::PKey::RSA.new File.read("private_key.pem") | |
| # Create new HTTP request |
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 "net/https" | |
| require "time" | |
| require "base64" | |
| require "uri" | |
| require "securerandom" | |
| # Load your private key | |
| pkey = OpenSSL::PKey::RSA.new File.read("private_key.pem") | |
| # Create new HTTP request |
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
| defmodule Foo do | |
| def bar(%{baz => _}), do: "I wish pattern matching map keys worked" | |
| 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
| %w(john paul ringo george).map { |p| p.capitalize } | |
| # => ["John", "Paul", "Ringo", "George"] |
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 'sneakers/runner' | |
| task :environment | |
| namespace :sneakers do | |
| desc "Start processing jobs with all workers" | |
| task :work => :environment do | |
| silence_warnings do | |
| Rails.application.eager_load! unless Rails.application.config.eager_load | |
| 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
| Function.prototype.curry = function() { | |
| var fn = this; | |
| var slice = Array.prototype.slice; | |
| var args = slice.call(arguments); | |
| return function() { | |
| return fn.apply(this, args.concat(slice.call(arguments))); | |
| } | |
| } |
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
| // Cannot init an NSManagedObject. Have to insert into an NSManagedObjectContext instance. | |
| NSManagedObjectSubclass * scratchObj = [NSEntityDescription insertNewObjectForEntityForName:@"Foo" | |
| inManagedObjectContext:AppDelegate.managedObjectContext]; | |
| // Set the properties on our object, e.g. via UITextField IBOutlets | |
| scratchObj.foo = @"foo"; | |
| // Post the object. Assume use of an RKMapping here. | |
| [[RKObjectManager sharedManager] postObject:scratchObj path:nil parameters:nil | |
| success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) { |
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
| // | |
| // NSString+Inflections.m | |
| // Zap | |
| // | |
| // Created by Stevie Graham on 28/10/2013. | |
| // | |
| #import "NSString+Inflections.h" | |
| @implementation NSString (Inflections) |
NewerOlder