Skip to content

Instantly share code, notes, and snippets.

View ilpeste's full-sized avatar
🙃

ilpeste ilpeste

🙃
View GitHub Profile
@ilpeste
ilpeste / gist:1533508
Created December 29, 2011 10:53
Prerequisites for a fresh rvm and ruby installation on Ubuntu
sudo apt-get install vim ruby subversion curl git build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison libmysqlclient16-dev libcurl3 libcurl3-gnutls libcurl4-openssl-dev analog apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common dbconfig-common libapache2-mod-php5 libaprutil1-dbd-sqlite3 libaprutil1-ldap libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libgd-gd2-perl libgd-graph-perl libgd-graph3d-perl libgd-text-perl libhtml-template-perl libmcrypt4 libnet-daemon-perl libplrpc-perl librmagick-ruby mysql-client mysql-server php5-cli php5-common php5-gd php5-mcrypt php5-mysql phpmyadmin rmagic
@ilpeste
ilpeste / changes.sh
Created October 25, 2011 10:50
Errors while installing ruby-oci8 on Ubuntu 11.10
# Natty (Ubuntu 11.04)
$ dpkg -L libc6-dev | grep /types.h
/usr/include/bits/types.h
/usr/include/rpc/types.h
/usr/include/sys/types.h
# Oneiric (Ubuntu 11.10)
$ dpkg -L libc6-dev | grep /types.h
@ilpeste
ilpeste / devise.it.yml
Created August 25, 2011 13:25
I18n for Devise < 1.4.2
# Italian translation for Devise 2.0
# Date: 2012-02-16
# Author: mcanato
# Note: Thanks to dn2k (https://gist.github.com/443837) for the first translation
it:
errors:
messages:
expired: "è scaduto, si prega di richiederne uno nuovo"
not_found: "non trovato"
@ilpeste
ilpeste / gist:1091625
Created July 19, 2011 07:46
Prespawn permission denied on Passenger start
$ passenger start
=============== Phusion Passenger Standalone web server started ===============
PID file: /home/matteo/code/prova/tmp/pids/passenger.3000.pid
Log file: /home/matteo/code/prova/log/passenger.3000.log
Environment: development
Accessible via: http://0.0.0.0:3000/
You can stop Phusion Passenger Standalone by pressing Ctrl-C.
===============================================================================
@ilpeste
ilpeste / compile_net_ldap.rb
Created February 25, 2011 16:37
This is the code I've used in order to compile the gem "net-ldap" in branch master from https://github.com/RoryO/ruby-net-ldap . If you use `gem install "net-ldap`, you will install the v0.1.1 version which don't supports Ruby 1.9.2 . When the developer
# Step 0: Add (temporary) the following gems to your application Gemfile
group :development, :test do
gem "hoe"
gem "rspec"
end
# ... and then ...
bundle install
# Step 1: Download the tarball from https://github.com/RoryO/ruby-net-ldap and untar it in vendor/gems/ruby-net-ldap folder
sudo apt-get install libmysqlclient-dev
@ilpeste
ilpeste / gist:779765
Created January 14, 2011 15:49
RVM and Rails 3 install
# Download and install RVM
bash < <(curl http://rvm.beginrescueend.com/releases/rvm-install-head)
mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone --depth 1 http://github.com/wayneeseguin/rvm.git && cd rvm && ./install
#Install the rubies with readline patch
rvm package install readline
rvm package install openssl
rvm package install iconv
rvm install 1.9.2 --with-readline-dir=$HOME/.rvm/usr --with-iconv-dir=$HOME/.rvm/usr --with-openssl-dir=$HOME/.rvm/usr
@ilpeste
ilpeste / pystartup.py
Created January 12, 2011 13:22
Main file for Python console autocomplete
import atexit
import os
import readline
import rlcompleter
historyPath = os.path.expanduser("~/.pyhistory")
historyTmp = os.path.expanduser("~/.pyhisttmp.py")
endMarkerStr= "# # # histDUMP # # #"
@ilpeste
ilpeste / passwd_shadow.rb
Created January 12, 2011 12:57
Questa classe permette di parsare, e fare il merge dei dati dei file /etc/passwd e /etc/shadow.
class PasswdShadow
# Questa classe permette di parsare, e fare il merge dei dati dei file
# /etc/passwd e /etc/shadow.
############################### Classe Entry #################################
# Questa classe permette di leggere una singola riga del file passwd passato.
class Entry
# Costruttore
def initialize
@attributes = {}