This file contains hidden or 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
#!/usr/bash | |
# Create npm package and repo for it on github | |
# usage: project test | |
# for private repo: project -p test | |
project() { | |
while [[ $# -gt 0 ]] | |
do | |
key="$1" |
This file contains hidden or 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 | |
# you can find listbox `https://github.com/gko/listbox` | |
source ~/listbox/listbox.sh | |
listbox -t "Stream:" -o "$(pactl list | grep "Monitor Source" | sed -e "s/.*Monitor Source:\s//" | tr '\n' '|')" -r stream | |
echo "" | |
cvlc -vvv pulse://"$stream" --sout '#transcode{acodec=mp3,ab=128,channels=2}:standard{access=http,dst=0.0.0.0:8888/t.mp3}' |
This file contains hidden or 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
/** | |
* number of occurences of substring | |
*/ | |
String.prototype.occurences = function(str, from, to) { | |
return this.substr(from||0, (to||this.length)-(from||0)).split(str).length-1; | |
}; | |
/** | |
* whether string starts with another string | |
*/ |
This file contains hidden or 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 p(s) { | |
var a = s.split('.').reverse(), | |
_p = function(a, d, o) { | |
var i=o?0:1; | |
if(d>0) { | |
var t={}; t[a[i]]=o||a[0]; | |
return _p(a.slice(1+i), d-1-i, t); | |
} else return o; | |
}; | |
return _p(a, a.length); |
This file contains hidden or 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
/*.Button {*/ | |
.Button { | |
... | |
} | |
.Button:hover { | |
... | |
} | |
/*}*/ |
This file contains hidden or 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
set langmap=ёйцукенгшщзхъфывапролджэячсмитьбюЁЙЦУКЕHГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;`qwertyuiop[]asdfghjkl\\;'zxcvbnm\\,.~QWERTYUIOP{}ASDFGHJKL:\\"ZXCVBNM<> |
This file contains hidden or 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
#!/usr/bin/bash | |
if [ "$(pgrep sp-sc-auth)" ]; then | |
killall sp-sc-auth; | |
fi | |
sp-sc-auth $1 3908 8908 > /dev/null & | |
sleep 10 && vlc http://localhost:8908/tv.asf |
This file contains hidden or 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
PS1="\n$background_blue \W/$(rvm_version_prompt) $background_green$(__gi t_ps1 " (%s) ")\n$normal$(echo -e " ℜ") ${normal}" |
NewerOlder