Best cheatsheet is: cucumber --help
Notification formats, in increasing order of verbosity:
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Colors</key> | |
<dict> | |
<key>Background</key> | |
<string>0.195 0.195 0.195</string> | |
<key>InsertionPoint</key> | |
<string>0.902 0.902 0.902</string> |
#!/usr/bin/env ruby | |
# This script converts xccolorthemes to dtvcolorthemes for porting xcode 3.x themes to xcode 4.x | |
# created by ashley towns <[email protected]> | |
# Public domain. | |
# ./dvtcolorconvert <inputfile> | |
# spits out a .dtvcolortheme file | |
require 'rubygems' | |
require 'plist' | |
raise "Error: need a source file #{__FILE__} [file.xccolortheme]" if ARGV.length == 0 |
/* | |
author: jbenet | |
os x, compile with: gcc -o testo test.c | |
linux, compile with: gcc -o testo test.c -lrt | |
*/ | |
#include <time.h> | |
#include <sys/time.h> | |
#include <stdio.h> |
/* | |
* Copyright (c) 2013 Calvin Rien | |
* | |
* Based on the JSON parser by Patrick van Bergen | |
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
* | |
* Simplified it so that it doesn't throw exceptions | |
* and can be used in Unity iPhone with maximum code stripping. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
# coding: utf-8 | |
require "date" | |
a = DateTime.new(2012, 1, 31, 23, 59, 55, "+09:00") | |
b = DateTime.new(2012, 2, 1, 0, 0, 0, "+09:00") | |
# (DateTime - DateTime)はRationalになるので、24 * 60 * 60をかけてto_iして秒単位に変換する | |
(b - a) # => (1/17500) | |
(b - a).class # => Rational |
Ruby の HTTP クライアントライブラリ Faraday が便利そう
API ラッパの開発には [RestClient gem][rest_client_gem] だとか
OAuth の必要なものは [Net/HTTP][net_http] + [OAuth gem][oauth_gem] を使ってた
[Twitter gem][twitter_gem] や [Instagram gem][instagram_gem] など API ライブラリのソースを読んでみると
[Faraday gem][faraday_gem] というものがよく使われてた
#import <UIKit/UIKit.h> | |
#import "OAConsumer.h" | |
#import "OADataFetcher.h" | |
#import "OAMutableURLRequest.h" | |
@interface testViewController : UIViewController { | |
IBOutlet UIButton *btnLogin; | |
IBOutlet UIWebView *oauthWebView; | |
IBOutlet UILabel *lblUser; |
#include <SDL2/SDL.h> | |
#define MUS_PATH "Roland-GR-1-Trumpet-C5.wav" | |
// prototype for our audio callback | |
// see the implementation for more information | |
void my_audio_callback(void *userdata, Uint8 *stream, int len); | |
// variable declarations | |
static Uint8 *audio_pos; // global pointer to the audio buffer to be played |
#!/bin/bash | |
# automation.sh | |
# Created by @idStar - Sohail Ahmed - September 2, 2012 | |
# This script launches the UIAutomation Instrument targeting a pre-existing iOS Simulator app, from the command line. | |
# Works with Xcode 4.4.1 on Mountain Lion | |
# | |
# Usage: | |
# automation <"App Name.app"> <"testFile.js"> <"base test script path"> <"base iOS Simulator path"> <"results output directory"> | |
# |