Skip to content

Instantly share code, notes, and snippets.

Roman Le Négrate Roman2K

Block or report user

Report or block Roman2K

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Roman2K
Roman2K / guard-kill
Created Jan 31, 2014
For when Guard doesn't behave after a Ctrl-C (won't exit or worse, leaves session-leader processes in the wild).
View guard-kill
#!/usr/bin/env bash
guard_pids() {
ps ax | egrep ' guard (master|worker)' | while read pid _; do
echo $pid
done
}
kill_guard() {
pids=$(guard_pids)
View coffee-check
#!/usr/bin/env bash
exec coffee -cs < "$1" > /dev/null
View gist:9048918
var url = 'http://www.unicreditbank.si/tecajna_lista/?t=1&id_menu=&language=ENG';
var rate = UrlFetchApp.fetch(url).getContentText().replace(/\s+/g, '').match(/>USD<\/td.*?>1,.*?>(1,\d+)/)[1];
View .Xresources-hybrid
! Hybrid Terminal Colours. Uses the palette from Tomorrow-Night:
! https://github.com/chriskempson/tomorrow-theme/blob/master/vim/colors/Tomorrow-Night.vim
! vim: ft=xdefaults
*background: #1D1F21
*foreground: #C5C8C6
! black
*color0: #282A2E
*color8: #373B41
! red
@Roman2K
Roman2K / inst.sh
Created Oct 23, 2014
Raw test script for a clean non-root install of wkhtmltopdf
View inst.sh
curl -L http://iweb.dl.sourceforge.net/project/wkhtmltopdf/0.12.1/wkhtmltox-0.12.1_osx-carbon-i386.pkg > wk.pkg \
&& pkgutil --expand wk.pkg wk \
&& mkdir unwk \
&& (cd unwk && gunzip < ../wk/Payload | cpio -id) \
&& mkdir dest \
&& (cd dest && tar x) < unwk/usr/local/share/wkhtmltox-installer/app.tar.xz
@Roman2K
Roman2K / yosemite_free_up_diskspace.sh
Last active Aug 29, 2015
Delete system apps to free up precious disk space in OS X Yosemite - http://forums.macrumors.com/showthread.php?p=20328653
View yosemite_free_up_diskspace.sh
#!/usr/bin/env bash
files=(
"/Applications/iMovie.app"
"$HOME/Library/iMovie"
/Applications/Photos.app
/Users/roman/Pictures/Photos\ Library.photoslibrary
"/Users/roman/Library/Preferences/com.apple.Photos.LSSharedFileList.plist"
@Roman2K
Roman2K / imac5k
Last active Aug 29, 2015
pry -eexit startup time
View imac5k
real 0m0.160s
user 0m0.123s
sys 0m0.035s
View youtube-dl-2.7
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'https://www.youtube.com/watch?v=jzkUUSWiM_4']
[debug] Encodings: locale UTF-8, fs utf-8, out None, pref UTF-8
[debug] youtube-dl version 2014.11.16
[debug] Git HEAD: ff0f8a1
[debug] Python version 2.7.8 - Darwin-14.0.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.2, ffprobe 2.2
[debug] Proxy map: {'http': 'http://localhost:22001/', 'https': 'http://localhost:22001/', 'no': 'localhost,127.0.0.1,.map.dev'}
[youtube] Confirming age
View woproxy
/tmp ❯ http_proxy= https_proxy= youtube-dl 'http://pluzz.francetv.fr/videos/c_a_vous.html' -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['http://pluzz.francetv.fr/videos/c_a_vous.html', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.11.16
[debug] Git HEAD: ff0f8a1
[debug] Python version 3.4.2 - Darwin-14.0.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {'no': 'localhost,127.0.0.1,.map.dev'}
You can’t perform that action at this time.