Skip to content

Instantly share code, notes, and snippets.

@Vunovati
Vunovati / remove a commit
Created October 13, 2012 11:20
Remove a commit from commit tree
git rebase -i <commit>~1
@Vunovati
Vunovati / simple-server.js
Created February 7, 2013 11:48
nodejs: simple http server
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname, filename = path.join(process.cwd(), uri);
@Vunovati
Vunovati / guake_iterms_desert_colorscheme
Created February 11, 2013 09:16
guake: emulate iterms desert scheme
gconftool-2 --set /apps/guake/style/font/color --type string "#FFFFFF"
gconftool-2 --set /apps/guake/style/background/color --type string "#333333"
gconftool-2 --set /apps/guake/style/font/bold --type string "#FFD700"
gconftool-2 --set /apps/guake/style/font/palette --type string "#4D4D4D:#FF2B2B:#98FB98:#F0E68C:#CD853F:#FFDEAD:#FFA0A0:#F5DEB3:#555555:#FF5555:#55FF55:#FFFF55:#87CEFF:#FF55FF:#FFD700:#FFFFFF"
@Vunovati
Vunovati / gist:5790012
Created June 15, 2013 23:28
Ruby: Build Rails project on CI
gem install --conservative bundler
bundle check || bundle install
bundle exec rake db:migrate
bundle exec rake db:test:prepare
bundle exec rspec spec
@Vunovati
Vunovati / gist:6173141
Created August 7, 2013 11:08
Oracle java download oneliner
wget --no-cookies \
--header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" \
"http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz" \
-O /tmp/jdk-7-linux-x64.tar.gz --no-check-certificate
@Vunovati
Vunovati / gist:6422481
Created September 3, 2013 11:04
Dynamic java home
export JAVA_HOME=$(dirname $(dirname $(readlink -f /usr/bin/java)))
@Vunovati
Vunovati / gist:6841932
Created October 5, 2013 14:58
Get yum working on Fedora 14 in lxc
$ curl -o fedora-release-14-1.noarch.rpm ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora/linux/releases/14/Fedora/i386/os/Packages/fedora-release-14-1.noarch.rpm
$ rpm -i fedora-release-14-1.noarch.rpm
@Vunovati
Vunovati / gist:7005022
Created October 16, 2013 09:22
Perform action on each file
for i in $(ls delivery/**/**tar.gz); do echo $i; done
@Vunovati
Vunovati / gist:4e68277d6c5b79b445bb
Created July 20, 2015 09:02
Extract json from file and lint it
jsonlint <(sed -n '/^{/,/^}/p' filename | sed 's/^}/},/g')

Keybase proof

I hereby claim:

  • I am vunovati on github.
  • I am vunovati (https://keybase.io/vunovati) on keybase.
  • I have a public key ASClncqC62C0eaXB3BD41d55YLZE4mon2DzlDJ2G4MwFKQo

To claim this, I am signing this object: