This file contains 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
# Clone rails from github | |
git clone git://github.com/rails/rails.git ~/Desktop/rails | |
cd ~/Desktop/rails | |
# Create a 2.3.8 vanila app | |
git co v2.3.8 | |
ruby ./railties/bin/rails ~/Desktop/rails2app | |
# Generate some models and a controller | |
cd ~/Desktop/rails2app |
This file contains 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
# Make port 80 "real life" speeds | |
# You can also use Mongrel ports. | |
function slow_port { | |
# Set the port variable if no port inputted. Defaulted to 80 (for Passenger). | |
if [ -z "$1" ] | |
then port=80 | |
else port=$1 | |
fi | |
# Slow the ports. |
This file contains 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
Dear Christos | |
Hope all is well | |
I have a position that I feel you may be interested in. (My apologies if this email is not of relevance to you) | |
The role is for an international client of mine and they are looking for the following: | |
My client, a market leader in virtual currency monetization, are looking for a senior software developer to engineer their platform to cope with growing traffic and business requirements.Tasks include designing and developing an in-house advertising & payment platform based on Ruby on Rails and working with the other lead developers to engineer a well-designed, maintainable and performing technology platform that can cope with the continuously growing traffic and business requirements. | |
This file contains 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 | |
# | |
# skeleton example file to build /etc/init.d/ scripts. | |
# This file should be used to construct scripts for /etc/init.d. | |
# | |
# Written by Miquel van Smoorenburg <[email protected]>. | |
# Modified for Debian | |
# by Ian Murdock <[email protected]>. | |
# | |
# Version: @(#)skeleton 1.9 26-Feb-2001 [email protected] |
This file contains 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
module ActionController | |
module Caching | |
module Fragments | |
def read_fragment_with_comment(name, options) | |
fragment = read_fragment_without_comment(name, options) | |
fragment && "\n<!-- cache-hit: #{name} -->\n#{fragment}\n<!-- /cache-hit: #{name} -->\n" || nil | |
end | |
alias_method_chain :read_fragment, :comment |
This file contains 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/ruby -w | |
=begin | |
/*************************************************************************** | |
* Copyright (C) 2008, Paul Lutus * | |
* * | |
* This program is free software; you can redistribute it and/or modify * | |
* it under the terms of the GNU General Public License as published by * | |
* the Free Software Foundation; either version 2 of the License, or * |
This file contains 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 | |
# jazzfonica.rb for Mac OS X | |
# Scans the visible networks for JAZZTEL_XXXX or WLAN_XXXX and calculates the password | |
# Ported from PHP example at http://kz.ath.cx/wlan/codigo.txt | |
# Download and execute with ruby (e.g. ruby jazzfonica.rb) from a Terminal | |
require 'digest/md5' | |
messages = [] | |
unless !File.exists?('/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport') |
This file contains 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 'rubygems' | |
require 'thread' | |
require 'rails/all' | |
require 'benchmark' | |
include ActionView::Helpers::FormOptionsHelper | |
puts "Using #{`ruby -v`}" | |
@choices = 700.times.collect { [(0...50).map{ ('a'..'z').to_a[rand(26)] }.join, rand(10000)] } |
This file contains 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
curl "https://raw.github.com/gist/1386087/2f757de4b575a632acc3d59c1224e2134ef7973c/ssh-copy-id" -o ~/bin/ssh-copy-id | |
chmod +x ~/bin/ssh-copy-id |
This file contains 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
# This is an event.d (upstart) script to keep monit running. | |
# To install disable the old way of doing things: | |
# | |
# /etc/init.d/monit stop && update-rc.d -f monit remove | |
# | |
# then put this script here: | |
# | |
# /etc/init/monit.conf | |
# | |
# and reload upstart configuration: |