Skip to content

Instantly share code, notes, and snippets.

View borgand's full-sized avatar

Laas Toom borgand

  • Estonia
View GitHub Profile
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 / 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
#!/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
#!/bin/bash
# Shell script to mount SSHFS while MacFusion is defunctional
# original idea by: renatojf
# written by: [email protected]
# Split the $1 for useful information
usr=${1/@*/}
usr=${usr:=$USER}
[[ $1 =~ ":" ]] && dst=${1/*:/}
@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",
@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}`