I hereby claim:
- I am oisin on github.
- I am oisin (https://keybase.io/oisin) on keybase.
- I have a public key whose fingerprint is 5A6B 3BEF B837 764F EAC4 FD6E 0D97 5065 C08C F6CF
To claim this, I am signing this object:
# Simple tester for Converser SDK feedback form manipulation. No network connections | |
# made. | |
#import "CIOSecondViewController.h" | |
@interface CIOSecondViewController () | |
@property (strong,nonatomic) VGConversationEngine *converser; | |
@end | |
@implementation CIOSecondViewController |
I hereby claim:
To claim this, I am signing this object:
# This initializer adds a method, show_mongo, when running a rails console. When active, all | |
# moped commands (moped is mongoid's mongodb driver) will be logged inline in the console output. | |
# If called again, logging will be restored to normal (written to log files, not shown inline). | |
# Usage: | |
# > show_mongo | |
if defined?(Rails::Console) | |
def show_mongo | |
if Moped.logger == Rails.logger | |
Moped.logger = Logger.new($stdout) |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
# Crush all the Pings! | |
for i in *.png | |
pngcrush "$i" `basename -s .png "$i"`-crushed.png |
This is a summary of an original prose piece
Author
Reviewer
require 'thread' | |
module Alert | |
def self.yikes(msg) | |
# Use this to log/trigger monitor | |
puts msg | |
end | |
end | |
# See http://burgestrand.se/code/ruby-thread-pool/ |
Simple server which just formats and prints JSON requests. |
require 'sinatra' | |
# Set the version of the API being run here | |
# | |
MAJOR_VERSION = 1 | |
MINOR_VERSION = 0 | |
helpers do | |
def version_compatible?(nums) | |
return MAJOR_VERSION == nums[0].to_i && MINOR_VERSION >= nums[1].to_i |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
# Replace stupid 'smart' quotes in text, replace '\n' with real | |
# newlines, change selected diacritical marks | |
# | |
def cleaned(str) | |
str.gsub(/\\n/,"\n").gsub(/\‘|\’/, "'").gsub(/\”|\“/, '"').gsub(/í/, 'i') | |
end |