Skip to content

Instantly share code, notes, and snippets.

View modsaid's full-sized avatar

Mahmoud Salem modsaid

View GitHub Profile
@shyam
shyam / compile-ruby-1.9.x-on-linux.sh
Created September 22, 2011 06:49
Installing Ruby 1.9.x from source on Linux ( Debian/Ubuntu and RHEL/CentOS )
# Note: This script show how to compile ruby-1.9.2-p290. It can also be used for 1.9.3-p0 or higher versions.
#
# Dependencies
#
# Debian and derivatives:
# aptitude install build-essential libssl-dev libcurl4-openssl-dev libreadline5-dev zlib1g-dev libxslt1-dev libxml2-dev
@huyng
huyng / reflect.py
Created February 7, 2011 17:57
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@tansengming
tansengming / Rails Console Actionmailer test.rb
Created April 24, 2009 15:14
Rails Console Actionmailer test
# Copy and paste this to the rails console to test your email settings
class MyMailer < ActionMailer::Base
def test_email
@recipients = "someone@somewhere.com"
@from = "must_be_same_as_smpt_account_login@gmail.com"
@subject = "test from the Rails Console"
@body = "This is a test email"
end
end