Skip to content

Instantly share code, notes, and snippets.

@rogerwalt
rogerwalt / gist:7823511
Created Dec 6, 2013
Make Caps-Lock another Esc-Key
View gist:7823511
# ~/.Xmodmap
!! No Caps Lock
clear lock
!! Make Caps_lock an escape key.
keycode 0x42 = Escape
# $ xmodmap ~/.Xmodmap
View .vimrc
syntax on
"set noexpandtab
"set copyindent
"set preserveindent
"set softtabstop=0
"set shiftwidth=2
"set tabstop=2
set ts=2
set sw=2
set foldmethod=indent
@rogerwalt
rogerwalt / gist:7300568
Created Nov 4, 2013
Windows PowerShell: Create Profile and add Alias to Notepad++ to it.
View gist:7300568
# create profile
New-Item -path $profile -type file -force
# open it with notepad
notepad $profile
# add alias to notepad++ to it
Set-Alias npp "C:\Program Files (x86)\Notepad++\notepad++.exe"
@rogerwalt
rogerwalt / StreamCloud_URLextractor.js
Created Jun 11, 2013
Simple one-liner to parse out the URL of the video file on StreamCloud.
View StreamCloud_URLextractor.js
window.location.href = document.getElementsByName("flashvars")[0].value.split("&file=")[1].split("&")[0].replace(/%3A/g, ":").replace(/%2F/g, "/");
@rogerwalt
rogerwalt / BitShare_URLextractor.js
Created Jun 11, 2013
Simple one-liner to parse out the URL of the video file on BitShare.
View BitShare_URLextractor.js
window.location.href = document.getElementById("stream_player").innerHTML.split('clip:')[1].split('url:')[1].split("'")[1]