Skip to content

Instantly share code, notes, and snippets.

@borgand
borgand / Rakefile
Created February 1, 2010 10:32 — forked from lukeredpath/gist:72511
Rakefile for iPhone distribution releasing
TARGET_NAME = "Rivals"
RELEASE_OUTPUT_PATH = File.expand_path("~/proged/releases/#{TARGET_NAME}")
CONFIGURATION = ENV['CONFIGURATION'] || "Release"
SDK_VERSION = ENV['SDK'] || 'iphoneos3.1'
desc "Build main target and zip the release bundle (also bumps all versions)."
task :release => ['bump:all'] do
puts "* Building #{CONFIGURATION} release."
`xcodebuild -target #{TARGET_NAME} -configuration #{CONFIGURATION} -sdk #{SDK_VERSION}`
@borgand
borgand / update_bundles
Created May 26, 2010 14:17
Zip-enabled version of update_bundles script
#!/usr/bin/env ruby
# Changelog:
# - added zip support
# - added support for cmd-line list of bundles to update
git_bundles = [
"http://github.com/astashov/vim-ruby-debugger.git",
#"http://github.com/msanders/snipmate.vim.git",
"http://github.com/scrooloose/nerdtree.git",
#!/bin/bash
# Shell script to mount SSHFS while MacFusion is defunctional
# original idea by: renatojf
# written by: laas.toom@gmail.com
# Split the $1 for useful information
usr=${1/@*/}
usr=${usr:=$USER}
[[ $1 =~ ":" ]] && dst=${1/*:/}
#!/bin/bash
# Function to connect to SMTP and send mail to it
# returns:
# 0 - SUCCESS
# 1 - FAILURE: unable to complete session to DATA command
# 2 - FAILURE: problems after DATA command (server did not enqueue the message)
function bash_mail(){
# Default configuration
# Can be overridden by ARGV in order: TO, SUBJECT, MESSAGE, FROM, SERVER
@borgand
borgand / ffmpeg_convert.sh
Created November 11, 2010 12:36
Part of AutomatorFFmpeg.action
#!/usr/bin/env sh
# main.command
# AutomatorFFmpeg
# Created by Laas Toom on 17.03.10.
# Copyright (c) 2010 Laas Toom, All Rights Reserved.
mypath=$(dirname $0)
if [[ -z "$ffmpeg_bin" ]]; then ffmpeg_bin=$(which ffmpeg); fi
class RobinHood
# Ask for skills: RobinHood.can_shoot_bow?
SKILLS=[:fight_with_sword, :shoot_bow, :ride_on_horseback,
:sneak, :survive_in_forest, :get_the_word_out,
:speak_english]
# Ask for personality: RobinHood.seeks_problems?
PERSONALITY = [:seeks_problems, :gets_things_done, :has_fun,
:loves_adrenaline, :has_style, :outlaw]
@borgand
borgand / mmo_test.rb
Created December 1, 2010 08:08
Testing Mmo#styles_fit
require 'test_helper'
require 'mocha'
class MmoTest < ActiveSupport::TestCase
# Set up equivalence classes for the tests
def setup
# Equivalence classes
@styles = {
"video" => {
@borgand
borgand / pow
Created June 23, 2011 15:50 — forked from ches/pow
A quick script to switch between running Pow and MacPorts Apache2 on OS X
#!/bin/sh -e
#/ Usage: pow [on|off]
#/ Toggle between running Pow (http://pow.cx) and Apache on Mac OS X.
# Show Usage
function usage {
grep '^#/' "$0" | cut -c4-
exit 2
}
[ -z "$1" -o "$1" = "--help" ] && usage
@borgand
borgand / config.ru
Created October 17, 2011 08:37 — forked from mislav/config.ru
Shortest simplest sweetest web "hello {NAME}" in Ruby
run ->(e){ n=e['PATH_INFO'][1..-1]; [200, {'Content-type'=>'text/html'}, ["Hello #{n}!"]] }
@borgand
borgand / devise.et.yml
Created April 16, 2012 10:36
Estonian translation for Devise
# encoding: utf-8
et:
errors:
messages:
expired: "on aegunud, palun küsi uus"
not_found: "ei leitud"
already_confirmed: "on juba kinnitatud, proovi sisse logida"
not_locked: "ei olnud lukus"
not_saved: