Skip to content

Instantly share code, notes, and snippets.

View inem's full-sized avatar

Ivan Nemytchenko inem

View GitHub Profile
RELEASE_OUTPUT_PATH = File.expand_path("~/Projects/releases/Squeemote")
TARGET_NAME = "Squeemote"
CONFIGURATION = ENV['CONFIGURATION'] || "Distribution"
SDK_VERSION = ENV['SDK'] || 'iphoneos2.2'
task :release do
puts "* Bumping build version."
`agvtool bump -all`
puts "* Building #{CONFIGURATION} release."
reinstall mysql - 64bit 10.5 build
- then reload the db
remove old macports dir - http://trac.macports.org/wiki/FAQ#uninstall
- and replace with new one built from source - http://forums.macrumors.com/showthread.php?t=720035
install ruby 1.8.6 - used rvm http://rvm.beginrescueend.com/
killed my old ~/.gem folder as they weren't working
- install the mysql gem - this was a pain
installed required gems by rake gems:install (do it for RAILS_ENV=test as well)
gem install webrat (for some reason rake gems didn't get it)
installed snow leopard compatibility bundle for textmate - http://ticket.macromates.com/show?ticket_id=0FDE7076
# Oleg Andreev <[email protected]> Oct 16, 2009
#
# This demonstrates how to perform a request to the same Rails instance without hitting HTTP server.
# Note 1: this does not boot another Rails instance
# Note 2: this does not involve HTTP parsing
# Note 3: dispatch_unlocked and rack.multithread=true are used to prevent deadlock on a dispatch mutex,
# NOT to make inner requests operate concurrently as one may think.
# Note 4: inner request is created by merging outer request with some HTTP headers and rack options.
# This may probably lead to strange effects, so be aware of it.
# Perhaps, we shouldn't use outer request at all. I don't know.

A Note

Forking has been fixed, but the old repositories will still be corrupted.

Basics

The method page will create a new page: page "home" do "Hello, world!"

#!/bin/bash -xe
EBS_DEVICE='/dev/sdh'
INSTANCE_ID=$1
AKI=${2:-'aki-5f15f636'}
ARI=${3:-'ari-0915f660'}
ARCH=${4:-'i386'}
SIZE=${5:-10}
AZ=${6:-'us-east-1d'}
NAME=${7:-"ami-from-$INSTANCE_ID"}
@inem
inem / url_dsl.rb
Created December 15, 2009 21:36 — forked from defunkt/url_dsl.rb
require 'open-uri'
# url dsl -- the ultimate url dsl!
#
# You just can't beat this:
#
# $ irb -r url_dsl
# >> include URLDSL
# => Object
# >> http://github.com/defunkt.json
1) Install pre-requisites
$ sudo port install libiconv slang2 glib2
2) Download the sources from http://www.midnight-commander.org/downloads
3) Configure the build:
./configure --prefix=/opt/mc --with-screen=slang --enable-extcharset --enable-charset --with-libiconv-prefix=/opt/local --with-slang-includes=/opt/local/include --with-slang-libs=/opt/local/lib
# Reincarnation for classes
class Class
def reincarnate
buried = Object.__send__(:remove_const, self.name)
Object.const_set(self.name, Class.new(buried))
end
end
class Abc
@inem
inem / deploy.rake
Created January 17, 2010 14:16 — forked from Sutto/deploy.rake
namespace :deploy do
def config(key)
(@config ||= YAML.load_file("config/deploy.yml").symbolize_keys)[key.to_sym]
end
# Hooks as needed
task :local_before do
end
@inem
inem / license
Created January 29, 2010 07:35 — forked from defunkt/license
#!/bin/sh -e
# Usage: license
# Prints an MIT license appropriate for totin' around.
#
# $ license > COPYING
#!/bin/sh
echo "Copyright (c) `date +%Y` Chris Wanstrath
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the