Skip to content

Instantly share code, notes, and snippets.

@vladimir-e
vladimir-e / boot_drive.sh
Created May 9, 2013 11:12
Create bootable USB device on mac os. #linux #osx #usb #iso
diskutil list
diskutil unmountDisk /dev/disk1
dd if=/Users/vlad/Downloads/imagefile.iso of=/dev/disk1 bs=1m
@vladimir-e
vladimir-e / git_branch_per_feature.sh
Last active December 17, 2015 03:59
Git workflow - branch per feature no fast forward #git
$ git checkout -b feature dev
# ...
$ git checkout dev
$ git merge --no-ff feature
$ git branch -d feature
$ git push origin dev
@vladimir-e
vladimir-e / tar.sh
Created June 22, 2013 18:38
#compress #tar #archive #linux #console
tar -zcvf archive.tar.gz dir
# -z: Compress archive using gzip program
# -c: Create archive
# -v: Verbose i.e display progress while creating archive
# -f: Archive File name
# Extract
tar -zxvf archive.tar.gz -C dir
@vladimir-e
vladimir-e / rbenv.sh
Created June 25, 2013 07:55
install / update ruby using #rbenv
# update on ubuntu
cd ~/.rbenv/
git pull
cd plugins/ruby-build
git pull
rbenv install -l
rbenv install 2.0.0-p195
rbenv global 2.0.0-p195
ruby -v
gem update --system
@vladimir-e
vladimir-e / gist:5859601
Last active December 18, 2015 23:09 — forked from GromNaN/gist:1342799
Find process ID #pid
# Find the process ID
ps -ax | grep Safari
# Pause the process
kill -STOP 1234
# Resume the process
kill -CONT 1234
# Force stop
@vladimir-e
vladimir-e / run_test.sh
Created July 20, 2013 13:47
Rub single rails test
ruby -I test test/unit/my_model_test.rb -n test_name
@vladimir-e
vladimir-e / rails_routes
Created July 27, 2013 12:22
Rails 4 routes page
http://localhost:3000/rails/info/routes
@vladimir-e
vladimir-e / .bashrc
Created July 28, 2013 09:07
Problem: "bash: warning: setlocale: LC_CTYPE: cannot change locale (ru_RU.UTF-8)"
export LC_CTYPE="en_US.UTF-8"
@vladimir-e
vladimir-e / auto_link.rb
Created July 29, 2013 14:41
Simple method which converts text urls into html links
@vladimir-e
vladimir-e / 1.catgories.js.coffee
Created August 12, 2013 14:56
Backbone resource
#= require jquery.ui.sortable
#= require jquery.ui.nestedSortable
#= require sortable_tree/initializer
#= require_self
# case insensitive jQuery Contains http://goo.gl/IrNmk
jQuery.expr[":"].Contains = (a, i, m) ->
jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0
jQuery.expr[":"].contains = (a, i, m) ->
jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0
$ ->