Skip to content

Instantly share code, notes, and snippets.

View borgand's full-sized avatar

Laas Toom borgand

  • Estonia
View GitHub Profile
@borgand
borgand / activeadmin.et.yml
Created February 18, 2014 15:21
ActiveAdmin Estonian translation
et:
active_admin:
dashboard: Töölaud
dashboard_welcome:
welcome: "Tere tulemast Active Adminisse. See on vaikimisi töölaud."
call_to_action: "Et lisada töölauale sektsioonie, uuri 'app/admin/dashboard.rb'"
view: "Vaata"
edit: "Muuda"
delete: "Kustuta"
delete_confirmation: "Oled sa kindel, et soovid seda kustutada?"
@borgand
borgand / compile_static_git.sh
Last active August 29, 2015 14:13
Compile static git (e.g. for use in jailed server environment). NB! The kernel version must match that of the destination for the binary to work.
#!/bin/sh
# What git version to build
git_version="2.2.2"
# let's make sure we have all we need to proceed
sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel autoconf
# Download sources
cd /tmp
@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",
@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 / nginx_mass_vhosts.conf
Created April 17, 2012 20:40
Nginx mass-virtualhosting with Unicorn and rails
# Mass-virtualhosting configuration for Nginx
# Sets up virtualhosts automatically, in the following way:
# test1.laas.tjs.ee -> /srv/laas/test1
# app.tjs.ee -> /srv/prod/test1
server {
# enable one of the following if you're on Linux or FreeBSD
listen 80 default deferred; # for Linux
# If you have IPv6, you'll likely want to have two separate listeners.