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
starenka /tmp % time lein -v | |
Leiningen 2.3.4 on Java 1.8.0_05 Java HotSpot(TM) 64-Bit Server VM | |
lein -v 1.95s user 0.09s system 130% cpu 1.566 total | |
starenka /tmp % time lein -v | |
Leiningen 2.3.4 on Java 1.8.0_05 Java HotSpot(TM) 64-Bit Server VM | |
lein -v 1.99s user 0.06s system 130% cpu 1.574 total | |
starenka /tmp % time lein -v | |
Leiningen 2.3.4 on Java 1.8.0_05 Java HotSpot(TM) 64-Bit Server VM | |
lein -v 1.98s user 0.08s system 125% cpu 1.641 total | |
starenka /tmp % time lein -v |
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
starenka /tmp % cat ~/.config/terminator/config | |
[global_config] | |
geometry_hinting = False | |
enabled_plugins = , | |
tab_position = hidden | |
borderless = True | |
[keybindings] | |
scaled_zoom = <Shift><Control>u | |
go_up = <Shift>Up | |
next_tab = <Shift>Right |
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
#!/usr/bin/env python | |
# coding=utf-8 | |
import argparse | |
from selenium import webdriver | |
BROWSERS = dict(phantom=webdriver.PhantomJS, | |
opera=webdriver.Opera, | |
firefox=webdriver.Firefox, | |
chrome=webdriver.Chrome |
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
#!/usr/bin/env python | |
# coding=utf-8 | |
import sys, operator, re | |
OPMAP = {'+': operator.add, '-': operator.sub, '/': operator.div, '*': operator.mul} | |
RE_PARSE = re.compile(r'(?P<op>[+\-/\*])\s+(?P<num>\d+)') | |
def apply(line, prev): | |
op, num = re.match(RE_PARSE, line.strip('\n')).groups() |
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
starenka /tmp % grep '^z.*l$' /data/slovniky/Czech.3-0-8utf8u.dic | |
zabal | |
zabalil | |
zabarikádoval | |
zabarvil | |
zabavil | |
zabavoval | |
zabejčil | |
zabezpečil | |
zabezpečoval |
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
''' | |
<?php | |
$array = array_fill(0,10000, "ahoj"); | |
$count = 0; | |
$length = 0; | |
foreach($array as $item) { |
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
class ModuleAdmin(admin.ModelAdmin): | |
class ParentFilter(SimpleListFilter): | |
title = _('Parent') | |
parameter_name = 'parent' | |
def lookups(self, request, model_admin): | |
return [(m.id, m.name) for m in Module.objects.filter(parent__isnull=True).order_by('name')] + [('Null', 'Null')] | |
def queryset(self, request, queryset): | |
if self.value(): |
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
#tady je priklad jednoho projektu: | |
# [-]luft_vagrant | |
# [+].hg | |
# .hgignore | |
# [+].vagrant | |
# README.md | |
# Vagrantfile | |
# [-]provisioning | |
# ansible_hosts |
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
cvt 1680 1050 #get xorg-like line for this resolution | |
xrandr --newmode "flatronw2242s" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync #make the mode | |
xrandr --addmode VGA1 "flatronw2242s" #add it to xrandr |
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
>>> from decimal import Decimal | |
>>> Decimal(10.2+30) | |
Decimal('40.2000000000000028421709430404007434844970703125') | |
>>> _ == Decimal(40.2) | |
True |