Skip to content

Instantly share code, notes, and snippets.

View douglas's full-sized avatar

Douglas Soares de Andrade douglas

View GitHub Profile
@douglas
douglas / install_swig_mac.sh
Created July 6, 2011 01:47
Install swig on a mac with homebrew
brew install https://raw.github.com/cobrateam/formulae/master/swig.rb
@douglas
douglas / gist:1066385
Created July 6, 2011 02:10
Changing git repository without needing to delete and clone the repository
# first see the current origin
git remote -v
# now we delete the origin
git remote rm origin
# now we set the new origin
git remote add origin git@github.com:user/reponame.git
# optional: make git pull and push from someremote (on our case, origin)
@douglas
douglas / gist:1066392
Created July 6, 2011 02:19
Install swig on a archlinux box
sudo pacman -S swig
@douglas
douglas / gist:1066406
Created July 6, 2011 02:27
Install swig on a ubuntu box
sudo apt-get install swig
@douglas
douglas / gist:1072791
Created July 8, 2011 20:52
Remove an unwanted commit on git and github
# force git/github to ignore a unwanted commit and use HEAD^ as HEAD of the repository
$ git push -f origin HEAD^:remote_branch
OR
$ git rebase -i HEAD~2
$ git push origin +master
References:
@douglas
douglas / gist:1072807
Created July 8, 2011 21:00
How to delete a remote branch
$ git push origin :remote_branch_name
@douglas
douglas / selenium_with_python.rst
Created July 22, 2011 23:24 — forked from baijum/selenium_with_python.rst
Selenium with Python

Selenium with Python

Author

Baiju Muthukadan

Email

baiju.m.mail AT gmail.com

Version

0.3.2

Note

@douglas
douglas / gist:1100860
Created July 23, 2011 02:07
Rename (it seems to create a new) branch on github
Execute this command:
$ git push origin remote_branch_name:new_branch_name
Remember that you should edit the repository info to change to the new branch so you can delete the old one with this command:
$ git push origin :old_branch_name
@douglas
douglas / update_git_repos.sh
Created October 14, 2011 15:04
Update all git repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
@douglas
douglas / hack.sh
Created April 2, 2012 16:53 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#