Skip to content

Instantly share code, notes, and snippets.

.ticket-reply-button-wrap > div {
float: right !important;
}
#nav {
display: none !important;
}
.console-header {
[2] pry(main)> Stripe::VERSION
=> "1.11.0"
[3] pry(main)> Stripe.api_key = '[redacted]'
=> "[redacted]"
[4] pry(main)> Stripe.api_version = '2014-01-31'
=> "2014-01-31"
[7] pry(main)> begin
[7] pry(main)* Stripe::Customer.create(email: 'baz@example.com', card: { number: '4000000000000002', exp_month: 12, exp_year: 2014 }, metadata: { profile_id: '100' })
[7] pry(main)* rescue Stripe::CardError => exception
[7] pry(main)* puts "Encountered a card error..."
20> func mult(a:Int)(b:Int) -> Int {
21. return a * b
22. }
23> mult(4)
$R10: (b: Int) -> Int =
24> mult(4)(b: 5)
$R11: Int = 20
#import "MSAppDelegate.h"
@implementation MSAppDelegate
@synthesize lifxContext, lastKeyPress;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
self.lifxContext = [[LFXClient sharedClient] localNetworkContext];
self.lastKeyPress = CACurrentMediaTime();
util = require 'util'
lifx = require './lifx'
lx = lifx.init()
log = (text) ->
process.stdout.write("#{text}\n")
typeIsArray = Array.isArray || (value) ->
{}.toString.call(value) is '[object Array]'
> tulip:navi go 🌱 master 🍂 9e7fbf5
import XMonad
import XMonad.Config.Xfce
main = xmonad xfceConfig
# Change to import the proper model object
from package import models
# Leave alone
from django.db.models.base import ModelBase
from django.contrib import admin
from inspect import getmembers
for model in getmembers(models):
if type(model[1]) == ModelBase: # model[1] is the actual object
# Michael A. Schade, www.mschade.me
URL = 'http://www.ksdk.com/weather/severe_weather/cancellations_closings/default.aspx'
closings = {
'School': [],
'Business': [],
}
def get_closings():
@michaelschade
michaelschade / gist:658867
Created November 1, 2010 21:08
The main.m for accentuateus-osx-service as described on http://mschade.me/
#import "Services.h"
int main(int argc, char *argv[]) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
Services *service = [[Services alloc] init];
NSRegisterServicesProvider(service, @"AccentuateUsService");
NS_DURING [[NSRunLoop currentRunLoop] run];
NS_HANDLER
NS_ENDHANDLER