Skip to content

Instantly share code, notes, and snippets.

View mariusbutuc's full-sized avatar
🌏

Marius Butuc mariusbutuc

🌏
  • Toronto, ON
  • 07:58 (UTC -04:00)
View GitHub Profile
@mariusbutuc
mariusbutuc / branch-delete.git
Created September 21, 2012 23:16
Delete Git branch: local and remote
git branch -d obsolete_branch
git push origin --delete obsolete_branch
@mariusbutuc
mariusbutuc / branch-rename-remote.git
Created September 21, 2012 23:12
Rename remote Git branch
git push origin previous_name:new_name
git branch new_name origin/new_name
# http://stackoverflow.com/a/3790682/341929
@mariusbutuc
mariusbutuc / branch-merge.git
Created September 13, 2012 15:05
Git (hotfix) branch merging workflow
[IMCloud (hotfix_<id>)]$ git checkout develop
[IMCloud (develop)]$ git pull origin develop
[IMCloud (develop)]$ git pull origin hotfix_<id>
< If there are any conflicts, solve them and: >
[IMCloud (develop|MERGING)]$ git add <files to be committed>
< Commit changes introduced by solving conflicts >
[IMCloud (develop|MERGING)]$ git commit -m "Pulling from branch hotfix_<id>"
[IMCloud (develop)]$ git push origin develop
[IMCloud (develop)]$ git checkout test
@mariusbutuc
mariusbutuc / db2.sh
Created September 10, 2012 19:47
Start DB2 v10.1 and enable Text Search, for each DB2 instance
#! /bin/sh
# vim /etc/init.d/db2.sh
# chmod 744 /etc/init.d/db2.sh
# ln /etc/init.d/db2.sh /etc/rc3.d/db2.sh
for i in `/opt/ibm/db2/V10.1/bin/db2ilist`;
do
su - $i -c "db2start"
su - $i -c 'db2ts "START FOR TEXT"'
have_library: checking for SQLConnect() in -ldb2... -------------------- no
"gcc -o conftest -I/Users/marius/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-darwin11.2.0 -I/Users/marius/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/Users/marius/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -I/opt/IBM/db2/V9.5/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe conftest.c -L. -L/Users/marius/.rvm/rubies/ruby-1.9.2-p290/lib -L/opt/IBM/db2/V9.5/lib32 -L. -lruby.1.9.1-static -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
@mariusbutuc
mariusbutuc / ibm_db upgrade
Created January 23, 2012 16:39
Attempt to upgrade the ibm_db gem from v2.5.7 to v2.5.9 on a Mac with IBM DB2 Client v9.5.2
Installing ibm_db (2.5.9) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/marius/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
creating gil_release_version
creating unicode_support_version
checking for SQLConnect() in -ldb2... no
checking for SQLConnect() in -ldb2... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
@mariusbutuc
mariusbutuc / gist:1000039
Created May 31, 2011 05:57
Use a project .rvmrc file for each of your projects
rvm --rvmrc --create use 1.9.2-p290@uxolo
@mariusbutuc
mariusbutuc / gist:999862
Created May 31, 2011 04:33
Installing the latest RVM release version in git
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
@mariusbutuc
mariusbutuc / gist:995532
Created May 27, 2011 15:48
Problems uninstalling Rake 0.9
[Suiram (master)]$ gem uninstall rake -v 0.9
ERROR: While executing gem ... (Gem::InstallError)
cannot uninstall, check `gem list -d rake`
[Suiram (master)]$ which rake
/home/marius/.rvm/gems/ruby-1.9.2-p180@global/bin/rake
[Suiram (master)]$ rvm use 1.9.2-p180@suiram --default
Using /home/marius/.rvm/gems/ruby-1.9.2-p180 with gemset suiram
[Suiram (master)]$ which rake
/home/marius/.rvm/gems/ruby-1.9.2-p180@global/bin/rake
[Suiram (master)]$ which rails
@mariusbutuc
mariusbutuc / myRubyMine.sh
Created May 18, 2011 15:18
Executable script to run RubyMine under Ubuntu, using bash
#!/bin/sh
export JDK_HOME=/usr/lib/jvm/java-6-sun
cd /home/marius/.RubyMine31/bin
exec ./rubymine.sh