Skip to content

Instantly share code, notes, and snippets.

starenka starenka

View GitHub Profile
View komunal.py
#!/usr/bin/env python
# coding=utf-8
import time
from pyquery import PyQuery as pq
def to_float(text):
return float(to_str(text).replace(',', '.').strip())
def to_str(el):
View gist:906b589144a4a75cba23
(defun epic-split ()
"[x|x + term]"
(interactive)
(delete-other-windows)
(split-window-vertically (floor (* 0.75 (window-height))))
(split-window-right (floor (* 0.5 (window-width))))
(other-window 2)
(get-term)
(other-window 1))
View gist:287f3f5fe791a0cfbb71
root kosmik0 /tmp # cat /etc/apt/preferences.d/iceweasel
Package: iceweasel
Pin: release o=Debian,a=experimental
Pin-Priority: 800
root kosmik0 /tmp # cat /etc/apt/preferences.d/testing
Package: *
Pin: release o=Debian,a=testing
Pin-Priority: 900
View gist:96de5e5cdf3d94b194c2
1 2 3 4
A |---|-O-|---|---|
E |---|---|-O-|---|
C |---|-O-|---|---|
G |---|---|---|---|
w/ same shape:
~~~~~~~~~~~~[ C ]~~~~~~~~~~~~~
4 5 6 7 8 9
View gist:5ecef2d92459c786db87
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
View gist:fba882b60b73a5300173
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
View ulozto_scrape
#!/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
View inurface.py
#!/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()
View zblib.sh
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
View gist:9466644
'''
<?php
$array = array_fill(0,10000, "ahoj");
$count = 0;
$length = 0;
foreach($array as $item) {
You can’t perform that action at this time.