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
python -c 'import SimpleHTTPServer; SimpleHTTPServer.test()' |
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 inspect | |
def print_args(func): | |
argspec = inspect.getargspec(func) | |
expected_arguments, expected_varargs = argspec.args, argspec.varargs | |
def rslt(*args, **kwargs): | |
print 'Calling {0}\n\tArguments: {1}\n\tKeyword arguments: {2}'.format(func.__name__, args, kwargs) | |
return_val = func(*args, **kwargs) | |
print '\n\tReturned value: {0}'.format(return_val) |
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
# 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 |
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
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
.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
.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
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
#!/bin/bash | |
pkg_path=$1 | |
filename=$(basename $pkg_path) | |
curl "$pkg_path" -o "$HOME/rpms/$filename" | |
pkcon install-local "$HOME/rpms/$filename" |
OlderNewer