Skip to content

Instantly share code, notes, and snippets.

View cicloid's full-sized avatar
🏠
Working from home

Gustavo Barron cicloid

🏠
Working from home
View GitHub Profile
@cicloid
cicloid / gist:4219567
Created December 5, 2012 21:16
Fast ruby 1.9.3-p327 with performance patches
export CXX=clang CC=clang CFLAGS="-march=native -O3 -pipe -fomit-frame-pointer"
curl https://raw.github.com/gist/1688857/rbenv.sh | sh
rbenv global 1.9.3-p327-perf
@cicloid
cicloid / 0-readme.md
Created November 19, 2012 19:31
ruby-1.9.3-p327 cumulative performance patch.

Patched ruby 1.9.3-p327 for 30% faster rails boot

Overview

This script installs a patched version of ruby 1.9.3-p327 with boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Many thanks to funny-falcon for the performance patches.

# Makes any NSObject conform to the NSCoding protocol
module Serializable
def initWithCoder(coder)
self.init
methods.grep(/\w=:$/).each do |method|
key = method.to_s.sub('=:', '')
self.send(method, coder.decodeObjectForKey(key))
end
self
def initWithCoder(decoder)
self.init
da_methods = self.class.instance_methods.find_all do |method|
method != :== &&
method != :! &&
self.class.instance_methods.include?(:"#{method}=")
end
da_methods.each do |attr|
.repl_history
build
resources/*.nib
resources/*.momd
resources/*.storyboardc
$ rake --trace
** Invoke default (first_time)
** Invoke simulator (first_time)
** Invoke build:simulator (first_time)
** Execute build:simulator
/usr/bin/env VM_KERNEL_PATH="/Library/RubyMotion/data/6.0/iPhoneSimulator/kernel-i386.bc" /Library/RubyMotion/bin/ruby --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/RubyMotion.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/CoreGraphics.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/CoreFoundation.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/Foundation.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/MobileCoreServices.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/CFNetwork.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/SystemConfiguration.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/Security.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/UIKit.bridgesupport" --uses-bs "/Libr
@cicloid
cicloid / TestFlight.podspec
Created August 23, 2012 16:11 — forked from zwaldowski/TestFlight.podspec
TestFlight CocoaPod
Pod::Spec.new do |s|
s.name = 'TestFlightSDK'
s.version = '1.1b1'
s.license = 'Commercial'
s.summary = 'TestFlightSDK for over-the-air beta testing and crash reporting.'
s.homepage = 'http://www.testflightapp.com'
s.author = { 'TestFlight' => 'support@testflightapp.com' }
s.source = { :http => 'https://d3fqheiq7nlyrx.cloudfront.net/sdk-downloads/TestFlightSDK1.1beta1.zip' }
s.description = 'TestFlightSDK for over-the-air beta testing and crash reporting.'
s.platform = :ios
@cicloid
cicloid / .tmux.conf
Created August 6, 2012 19:05
My TMUX Conf
# Setting the prefix from C-b to C-a
set -g prefix C-a
# Free the original Ctrl-b prefix keybinding
unbind C-b
#setting the delay between prefix and command
set -sg escape-time 1
# Ensure that we can send Ctrl-A to other apps
bind C-a send-prefix
# Set the base index for windows to 1 instead of 0
set -g base-index 1
@cicloid
cicloid / gist:3173324
Created July 24, 2012 23:22
Check is Mountain Lion is available
#!/bin/csh
while (1)
curl -silent -A "iMacAppStore/1.0.1 (Macintosh; U; Intel Mac OS X 10.7.4; en) AppleWebKit/533.20.25" 'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewGrouping?id=29526&mt=12' | grep -i "mountain lion" > /dev/null
if ($? == 0) then
echo "Available"
say -v Vicki "MOUNTAIN LION MAY BE AVAILABLE. Go... go now and download it"
else
echo "Nada"
endif
sleep 600
find . -name '*ipa' -exec metaipa.sh {} \;