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/sh | |
# Get all the python files staged for committing | |
py_files=`git diff --name-only HEAD|grep '.py$'` | |
# If we;re trying to commit a pdb.set_trace() display an error message and exit right away with status 1 | |
grep -n 'pdb.set_trace()' $py_files && echo -e "\033[1;31m Debugger statements!!!\033[0m" && exit 1 | |
# Run pyflakes on all the files beign committed and exit with status 0 if there are no errors, else show error message | |
pyflakes $py_files && exit || echo -e "\033[1;31m Lint error!\033[0m" | |
# If we’re here, then pyflakes failed, exit with status 1 |
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.w3.org/1999/xhtml); | |
@-moz-document domain("fmi.py-bg.net"), domain("fmi.ruby.bg"), domain("fmi.clojure.bg"), domain("fmi.golang.bg") { | |
body { | |
background-color: #151515; | |
color: #fefefe; | |
} | |
header { | |
background: inherit !important; |
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 | |
pkg_path=$1 | |
filename=$(basename $pkg_path) | |
curl "$pkg_path" -o "$HOME/rpms/$filename" | |
pkcon install-local "$HOME/rpms/$filename" |
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))); | |
}; |
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
.commit-group-item .gobutton { | |
background-color: #2b2b2b; | |
background-image: none; | |
} | |
.commit-group-item:nth-child(2n+1) .gobutton { | |
background-color: #3f3f3f; | |
background-image: none; | |
} |
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
.vellip, .vellip:before, | |
.vellip:after, | |
.conversation-module > li:after, | |
.conversation-module > li:before { | |
background-color: #4E9E20; | |
} | |
.conversation-module>li:after, .conversation-module>li:before { | |
width: 2px; | |
left: -10px; |
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
ko.extenders.smart_throttle = function(target, timeout) { | |
target['throttleEvaluation'] = timeout; | |
target['lastUpdatedValue'] = null; | |
var writeTimeoutInstance = null; | |
return ko.computed({ | |
'read': target, | |
'write': function(value) { | |
if (value == target()) { | |
clearTimeout(writeTimeoutInstance); |
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
# encoding: utf-8 | |
describe GameOfLife::Board do | |
describe 'initialization' do | |
it 'accepts multiple coords in the constructor' do | |
board = new_board [0, 0], [1, 1], [2, 2] | |
end | |
end | |
describe 'corner cases' do |