Skip to content

Instantly share code, notes, and snippets.

View sourcerebels's full-sized avatar

Edu Rodríguez Castillo sourcerebels

View GitHub Profile
@sourcerebels
sourcerebels / remove-cvs-from-git.sh
Created March 22, 2012 07:58
Git > Remove CVS directories from Git repository without deleting it from filesystem
find <directory> -name 'CVS' -type d | xargs -d "\n" git rm -r --cached
@sourcerebels
sourcerebels / script.sh
Created March 13, 2012 06:21
Thunderbird > Google Calendar Sync
# Ubuntu 11.10
# http://www.webupd8.org/2012/03/how-to-synchronize-google-calendar-with.html
sudo aptitude install xul-ext-lightning xul-ext-gdata-provider
@sourcerebels
sourcerebels / gitconfig
Created March 11, 2012 09:37
SCM > Git > Configuration
[user]
name = [username]
email = [email]
[color]
ui = auto
[alias]
l = log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
ll = log --stat --abbrev-commit
@sourcerebels
sourcerebels / test.rb
Created March 5, 2012 16:31
BDD > Ruby > RSpec Specification Sample
class Test
def initialize(value)
@value = value
end
def reverse
@value = @value.reverse!
end
def value
@value
@sourcerebels
sourcerebels / README.textile
Created March 2, 2012 19:17
BDD > Python > Lettuce Specification Sample

Description

A specification sample for Lettuce (BDD-style for python language).

Output

$ lettuce

Feature: some feature               # features/some.feature:1
@sourcerebels
sourcerebels / download-phrack-issues.sh
Created February 20, 2012 20:14
Download all Phrack Magazine Issues
#!/bin/sh
for i in {1..67}
do
FILE="phrack${i}.tar.gz"
wget http://phrack.org/archives/tgz/${FILE}
tar xvzf ${FILE}
rm ${FILE}
done
@sourcerebels
sourcerebels / create-user.sql
Created February 18, 2012 23:01
MySQL > Create user
GRANT ALL PRIVILEGES ON <database>.* TO '<user>'@'<host>' IDENTIFIED BY '<password>';
FLUSH PRIVILEGES;
@sourcerebels
sourcerebels / search.process.named
Created February 17, 2012 07:54
unix > administration > search processes by name
#!/bin/bash
#
# Searches process by name, print ps header
#
if [ $# -ne 1 ]; then
echo "usage: $(basename $0) <name>"
exit 1
fi
@sourcerebels
sourcerebels / linker-tools-1.txt
Created February 14, 2012 11:08
Linux > Linker tools
$ ldd spotify 2 | grep -i libxml
libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00000038cc400000)
@sourcerebels
sourcerebels / bash_aliases.sh
Created February 13, 2012 13:43
Unix > Bash > Aliases
# Editor
export EDITOR=gvim
# Java, Groovy & Grails SDK and tools configuration
export JAVA_HOME=/opt/java
export GROOVY_HOME=/opt/groovy
export GRAILS_HOME=/opt/grails
export GRADLE_HOME=/opt/gradle