Skip to content

Instantly share code, notes, and snippets.

View wbotelhos's full-sized avatar
💭
I'm not my code.

Washington Botelho wbotelhos

💭
I'm not my code.
View GitHub Profile
@wbotelhos
wbotelhos / gist:3133128
Created July 18, 2012 00:16
Installing Postgre on Ubuntu
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:pitti/postgresql
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install postgresql libpq-dev
@wbotelhos
wbotelhos / DocumentToString.java
Created July 18, 2012 21:07
DOM Document to String
import java.io.File;
import java.io.StringWriter;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
@wbotelhos
wbotelhos / gist:3165894
Created July 23, 2012 20:04
Install SQL Developer on Ubuntu
# Download: http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
sudo apt-get install alien
sudo alien -k --scripts sqldeveloper*.rpm
sudo dpkg -i sqldeveloper*.deb
mkdir -p ~/.sqldeveloper
# Paste the JDK path inside (/usr/lib/jvm/java-1.6.0-openjdk-i386)
vim ~/.sqldeveloper/jdk
@wbotelhos
wbotelhos / gist:3498468
Created August 28, 2012 14:25
Open folder from terminal (Ubuntu)
# Generic
xdg-open .
# Gnome
gnome-open .
# Nautilus
nautilus .
@wbotelhos
wbotelhos / gist:3676625
Created September 8, 2012 16:15
Library not loaded: libmysqlclient.18.dylib (LoadError)
# solve with symbolic link
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
# solve with classpath
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
@wbotelhos
wbotelhos / gist:3688897
Created September 10, 2012 04:35
cannot load such file -- capistrano_colors (LoadError)
rvm gemset use global
gem install capistrano_colors
@wbotelhos
wbotelhos / gist:3822783
Created October 2, 2012 19:37
rmagick install (ubuntu)
sudo apt-get install libmagickcore-dev
sudo apt-get install imagemagick
sudo apt-get install libmagickwand-dev
@wbotelhos
wbotelhos / firefox.sh
Last active June 8, 2022 04:22
Firefox Install (Ubuntu)
#!/bin/sh
set -e
# Firefox launcher containing a Profile migration helper for
# temporary profiles used during alpha and beta phases.
# Authors:
# Alexander Sack <[email protected]>
# Fabien Tassin <[email protected]>
@wbotelhos
wbotelhos / env.rb
Last active February 12, 2018 14:07
Configuring Firefox Binary.path for Cucumber (Ubuntu)
# Could not find Firefox binary (os=linux). Make sure Firefox is installed or set the path manually with Selenium::WebDriver::Firefox::Binary.path= (Selenium::WebDriver::Error::WebDriverError)
require 'selenium-webdriver'
Selenium::WebDriver::Firefox::Binary.path='/usr/bin/firefox/firefox-bin'
@wbotelhos
wbotelhos / gist:4120538
Created November 20, 2012 19:45
Blocking IP via Iptables
iptables -I INPUT -s x.p.t.o -j DROP