Skip to content

Instantly share code, notes, and snippets.

View kvbik's full-sized avatar

Jakub Vysoký kvbik

View GitHub Profile
@kvbik
kvbik / nmchecker.sh
Created February 24, 2014 15:06
to jsem dopad...
#!/bin/sh
H=192.168.1.10
[[ $1 ]] && H=$1
while true; do
sleep 5
ping -W3 -c1 $H &>/dev/null && continue
echo "`date` - restarting wifi"
@kvbik
kvbik / my_first_test.rb
Created February 25, 2014 11:13
python like testing in ruby
require 'test/unit'
class MyFirstTest < Test::Unit::TestCase
def test_for_truth
assert true
end
def test_multiplying
assert_equal 4, 2*2
end
end
@kvbik
kvbik / link.rst
Last active August 29, 2015 13:57
it hubbers meetup
@kvbik
kvbik / lambda.py
Last active August 29, 2015 14:04
co je na tom spatne?
In [1]: class O(object):
...: def _neco(self, param):
...: return param
...: def __init__(self, *args, **kwargs):
...: self.something = s = {}
...: for a,b in [(1,10),(2,20),(3,30)]:
...: s[a] = lambda: self._neco(b)
...:
In [2]: o = O()
Verifying that +kvbik is my Bitcoin username. You can send me #bitcoin here: https://onename.io/kvbik
@kvbik
kvbik / alias.sh
Created November 21, 2014 01:25
nechte si @napyvo pred @starenka chvili odemceny notebook a vase produktivita je ta tam :)) https://twitter.com/kvbik/status/535605055760924674
#alias vi=vim
alias vi=emacs
#alias g=git
alias g=hg
#alias rm_pyco='find . -name "*.py[co]" -exec rm -v {} \;'
alias rm_pyco='echo banik'
@kvbik
kvbik / screenrc
Created January 26, 2015 12:56
my config for gnu screen
# include default settings
source /etc/screenrc
# disable startup
startup_message off
# set bottom line
hardstatus alwayslastline "%{= dc}%-Lw%{= dw}%{!b}%n*%f %t%{!b}%{= dc}%+Lw%=[ %H ] %d.%m.%Y %c:%s"
# default term variable
[color]
status = auto
diff = auto
branch = auto
[alias]
st = status
ci = commit
co = checkout
[core]
@kvbik
kvbik / pull.sh
Created May 5, 2015 20:12
quick and hacky shell script for transforming github issue to a pull request
#!/bin/bash
# all credits and thx to http://stackoverflow.com/a/4529172
[[ $1 ]] && ISSUE=$1 || exit
[[ $2 ]] && BRANCH=$2 || exit
[[ $3 ]] && BASE=$3 || BASE=master
OWNER=walksource
REPO=roomstorm-backend
@kvbik
kvbik / pokus.bat
Created November 21, 2010 18:54
why this fails on windows?
c:\users>pokus.py
128
c:\users>pokus.bat
128
c:\users>run.py
c:\users>