Skip to content

Instantly share code, notes, and snippets.

@rudyjahchan
rudyjahchan / Rakefile
Created June 9, 2011 16:45
Building and Deploying iOS Projects through Rake
require 'yaml'
require 'uri'
require 'tempfile'
require 'tmpdir'
SDK_DIR = "/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk"
TESTFLIGHT_URL = 'http://testflightapp.com/api/builds.json'
PROJECT_DIR = File.dirname __FILE__
RUBIOS_DIR = File.join(PROJECT_DIR, 'rubios')

Keybase proof

I hereby claim:

  • I am rudyjahchan on github.
  • I am rudy (https://keybase.io/rudy) on keybase.
  • I have a public key ASBlzEffWUxHOm2z9XLUaj20HHPIhB9CN25nOVBQClN5Cwo

To claim this, I am signing this object:

Game = require '../models/game'
game = null
sendGameUpdate = (game)->
process.send
type: 'game'
game: game.toJSON()
sendGameStop = (game)->
cluster = require 'cluster'
numCPUs = require('os').cpus().length
exports = module.exports = launch: ->
console.log 'Before the fork'
if (cluster.isMaster)
console.log 'I am the master, launching workers!'
cluster.fork() for i in [0...numCPUs]
else
@rudyjahchan
rudyjahchan / atom.xml
Created November 25, 2012 05:56
Various Templates for Jekyll
---
layout: nil
---
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>rudyjahchan.com</title>
<link href="http://rudyjahchan.com/"/>
<link type="application/atom+xml" rel="self"
href="http://rudyjahchan.com/atom.xml"/>
jQuery(($) => {
$("#menu-toggle").click((evt) => {
evt.preventDefault();
$('.menu-activable').toggleClass('menu-active');
return false;
});
});
@rudyjahchan
rudyjahchan / TimeHelper.swift
Last active November 2, 2016 06:16
A playground to get easy helpers for dates
//: Playground - noun: a place where people can play
import Foundation
extension DateComponents {
static prefix func - (components: DateComponents) -> DateComponents {
var newComponents = DateComponents()
newComponents.calendar = components.calendar
newComponents.timeZone = components.timeZone
@rudyjahchan
rudyjahchan / Experiment1.swift
Last active October 27, 2016 17:10
Experiments in typing
//: Playground - noun: a place where people can play
import UIKit
protocol HasCreatedAtTimestamp {
var createdAt: Date { get }
func setCreatedAt(date: Date) -> Self
}
//: Playground - noun: a place where people can play
import UIKit
typealias Properties = Dictionary<String,Any?>
struct TypeKey {
let type: Any.Type
}
@rudyjahchan
rudyjahchan / NSObject_Swizzle.h
Last active August 13, 2016 08:29
Monkey-Patching iOS with Objective-C Categories Part III: Swizzling
#import <Foundation/Foundation.h>
@interface NSObject (Swizzle)
+ (void)swizzleInstanceSelector:(SEL)originalSelector
withNewSelector:(SEL)newSelector;
@end