This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form> | |
<select name="menu" onChange="javascript:parent.location = | |
this.form.menu.options[this.form.menu.selectedIndex].value;"> | |
<option value="lol">lol</option> | |
{% for country in countries %} | |
{% if country == active_country %} | |
<option selected="selected" value="/{{ country.english_name|escape }}">{{ country.english_name }} {{ country.arabic_name }}</option> | |
{% else %} | |
<option value="/{{ country.english_name|escape }}">{{ country.english_name }} {{ country.arabic_name }}</option> | |
{% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim_plugin_task "pep8", "git://github.com/nvie/vim-pep8.git" | |
vim_plugin_task "pyflakes", "git://github.com/nvie/vim-pyflakes.git" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# CIJoe mail notification script. | |
# Some things in here are shamelessly ripped from | |
# http://gist.github.com/374030 | |
# | |
# Call this from your hooks (build-worked, build-failed) with something like: | |
# ~/ci/scripts/mail.rb ~/ci/PROJECT/ CIJOE_URL BRANCH | |
# | |
# Requirements |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Day job: student & ceo of octothorp.eu | |
Your Rails contributions (if any): none, so far. | |
What's your Ruby/Rails experience?: 1,5 months.. And the crowd goes wild. | |
How do you use GitHub?: I use GitHub to convince the people I work with to use git. (and of course all the good stuff, code review, issues(!), wiki, gists, not forgetting about projects that might be interesting -> following) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
degrees = [ | |
"Bachelor of Science", | |
"Bachelor of Arts", | |
"Bachelor of Design", | |
"Bachelor of Engineering", | |
"Bachelor of Applied Science", | |
"Bachelor of Business Administration", | |
"Bachelor in Management Studies", | |
"Bachelor of Administrative Studies", | |
"Bachelor of Commerce", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
unset GIT_DIR | |
cd .. | |
git reset HEAD --hard | |
# kill the scheduler if running | |
pid=$(ps a | grep 'sched.rb' | grep -v 'grep' | cut -d ' ' -f 1) | |
if [ ! -z "$pid" ]; then | |
# scheduler script running | |
kill $pid | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ECHO(1) BSD General Commands Manual ECHO(1) | |
NAME | |
echo -- write arguments to the standard output | |
SYNOPSIS | |
echo [-n] [string ...] | |
DESCRIPTION | |
The echo utility writes any specified operands, separated by single blank (` ') characters and followed by a newline (`\n') character, to the standard output. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'xmpp4r' | |
require 'xmpp4r/muc/helper/simplemucclient' | |
# Most of this is borrowed from https://gist.github.com/941931 | |
# Added support for multiple rooms and external handling of messages. | |
# We want the MUC functionality to just handle shit for us. Unfortunately we | |
# have to override/repeat the join method in order to add the directive that |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/env ruby | |
#require 'rubygems' # dies nur bei ruby 1.8 | |
require 'sinatra' | |
post '/oh_yeah' do | |
pull = `cd git-repo && git checkout master && git pull` | |
unless pull.chomp == "Already up-to-date." | |
msg = `cd git-repo && git log -n 1 --format=full` | |
`cp -r git-repo/* svn-repo/` | |
`cd svn-repo && svn add --force . && svn commit --message "#{msg}"` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'rest_client' | |
require 'selenium-webdriver' | |
# to run this script headless install xvfb | |
# Xvfb :99 -ac & | |
# export DISPLAY=:99 | |
post '/' do | |
begin | |
puts params.inspect |
OlderNewer