This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
@asyncio.coroutine | |
def open_file(name): | |
print("opening {}".format(name)) | |
return open(name) | |
@asyncio.coroutine | |
def close_file(file): | |
print("closing {}".format(file.name)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setlocal spell spelllang=bg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function config() { | |
./configure \ | |
--with-features=huge \ | |
--enable-multibyte \ | |
--enable-rubyinterp=yes \ | |
--enable-pythoninterp=yes \ | |
--with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \ | |
--enable-python3interp=yes \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch -n 5 "deluge-console info|ack-grep 'State: Downloading' -A 5 -B 2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
#PanelUI-button, | |
#bookmarks-menu-button, | |
#downloads-button, | |
#home-button, | |
#abp-toolbarbutton, | |
#urlbar-history-dropmarker, | |
#back-button, | |
#forward-button { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for h in {0..23} | |
do | |
hour=`printf "%02d" $h` | |
for minutes in 00 15 30 45 | |
do | |
wget https://sslimgs.xkcd.com/comics/now/${hour}h${minutes}m.png | |
done | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function currently_installed_kernel() { | |
yaourt -Qi linux | egrep '^Version\s+:\s+.+$' | sed -e 's/Version\s\+:\s\+//' | |
} | |
function currently_running_kernel() { | |
uname -a | grep -P '\S+(?=-ARCH)' -o | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
import os | |
import subprocess | |
import sys | |
import re | |
uri = sys.argv[1] | |
print(uri) | |
file_path_with_position = re.sub(r'editor://|vim://', '', uri) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ -z $TMUX ]]; then | |
new_session_token='START NEW SESSION' | |
no_session='DO NOT START TMUX' | |
choice=$( (echo $new_session_token; echo $no_session; tmux ls) | fzf | cut -d':' -f 1) | |
case "$choice" in | |
"$new_session_token") | |
tmux new-session | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sum(a, b) { return a + b; } | |
function mult(a, b) { return a * b; } | |
Function.prototype.curry = function ( ) { | |
var slice = Array.prototype.slice, | |
args = slice.apply(arguments), | |
that = this; | |
return function ( ) { | |
return that.apply(null, args.concat(slice.apply(arguments))); | |
}; |
NewerOlder