Skip to content

Instantly share code, notes, and snippets.

Christos Zisopoulos christos

Block or report user

Report or block christos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# Clone rails from github
git clone 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
christos / gist:567537
Created Sep 6, 2010 — forked from zachinglis/gist:143695
Make port 80 "real life" speeds
View gist:567537
# 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
# Slow the ports.
View gist:584019
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.
View etc-init-d-monit
#! /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 <>.
# Modified for Debian
# by Ian Murdock <>.
# Version: @(#)skeleton 1.9 26-Feb-2001
christos / cache_with_comment.rb
Created Dec 30, 2010
Surround cached fragments with HTML comments (Rails 2.3 initalizer)
View cache_with_comment.rb
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
alias_method_chain :read_fragment, :comment
View rbeautify.rb
#!/usr/bin/ruby -w
* 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 *
View jazzfonica.rb
#!/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
# 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')
christos / profile_options_for_select.rb
Created Jul 27, 2011
Profile testing options_for_select
View profile_options_for_select.rb
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)] }
View ssh-copy-id
curl "" -o ~/bin/ssh-copy-id
chmod +x ~/bin/ssh-copy-id
christos / monit.conf
Created Dec 17, 2011 — forked from shapeshed/monit.conf
Upstart script for monit on Ubuntu 10.04
View monit.conf
# 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:
You can’t perform that action at this time.