Skip to content

Instantly share code, notes, and snippets.

View ervinb's full-sized avatar

Ervin Barta ervinb

View GitHub Profile
@ervinb
ervinb / phantomjs2.sh
Last active August 29, 2015 14:18
phantomjs2-semaphore
if ! [ -e .semaphore-cache/phantomjs-2.0-semaphore.tar.bz2 ]; then (cd .semaphore-cache; curl -OL https://s3-us-west-2.amazonaws.com/container-libraries/phantomjs-2.0-semaphore.tar.bz2); fi
sudo tar -xjf .semaphore-cache/phantomjs-2.0-semaphore.tar.bz2 -C /usr/local/
sudo ln -fs /usr/local/phantomjs-2.0-semaphore/bin/phantomjs /usr/local/bin/phantomjs
echo ">> PhantomJS is on version `phantomjs -v`"
@ervinb
ervinb / w7_usb_ubuntu.md
Last active August 29, 2015 14:13
Bootable Windows 7 USB Stick from Ubuntu

Install required packages

sudo apt-get install gparted ntfs-3g

Create the bootable USB stick

GParted

  • format the USB drive with GParted to NTFS
  • while still in GParted, right click on the newly formatted volume
@ervinb
ervinb / debugger-fix.md
Last active August 29, 2015 14:10
Fix debugger installation for any Ruby patchlevel

Use the debugger gem with unsupported Ruby versions

  • replace the version of debugger-ruby_core_source in the path below, with the one you're using
gem install minitar
gem install debugger-ruby_core_source // or install it with bundler
cd ~/.rbenv/versions/2.0.0-p598/lib/ruby/gems/2.0.0/gems/debugger-ruby_core_source-1.3.7 && rake add_source VERSION=2.0.0-p598 && cd -
@ervinb
ervinb / vim-bash-256-colors.md
Last active August 29, 2015 14:07
Vim 256 color mode in Bash

Requirements

  • Install sudo apt-get install ncurses-term

Config files


~/.vimrc

@ervinb
ervinb / rebind-ubuntu-keys.md
Last active July 3, 2021 12:24
Rebind Ubuntu keyboard

Find the key you want to change

  • run xev which opens a new window
  • when you type the key that you want to rebind, the terminal from which xev is run will display all the info about that key
  • look for the keycode section
  • gather all the keycodes this way

Rebind the key

  • run xmodmap -e "keycode = " where expression is the value (Escape, Control_L, etc.)