Skip to content

Instantly share code, notes, and snippets.

View domenkozar's full-sized avatar
💭
I may be slow to respond.

Domen Kožar domenkozar

💭
I may be slow to respond.
View GitHub Profile
### Keybase proof
I hereby claim:
* I am iElectric on github.
* I am ielectric (https://keybase.io/ielectric) on keybase.
* I have a public key whose fingerprint is BD8D E44A 13F1 0123 657F E672 50B6 E094 CDFE 8848
To claim this, I am signing this object:
[32487:0525/125411:INFO:CONSOLE(28)] ""Error while emitting" "modeset" "Cannot read property 'requiredCapabilities' of undefined" "TypeError: Cannot read property 'requiredCapabilities' of undefined\n at Object.api.isVisible (app://./js/command.js:76:47)\n at eval (app://./js/handlers.js:104:32)\n at Array.filter (native)\n at getHandlerCommandsForMode (app://./js/handlers.js:103:41)\n at runSessionHandler (app://./js/handlers.js:115:32)\n at analyze (app://./js/handlers.js:190:13)\n at eval (app://./js/handlers.js:41:21)\n at EventEmitter.emit (app://./js/lib/events.js:47:30)\n at Object.api.setSessionMode (app://./js/modes.js:110:30)\n at eval (app://./js/session_manager.js:52:31)"", source: app://./js/log.js (28)
return toolz.compose(
# filter out meaningless values
curried.filter(lambda x: x not in ('IME PREDPISA', '')),
# extract data from each row
curried.map(lambda tr: pq(tr).find('td').eq(1).text()),
# get all rows in tables
curried.mapcat(lambda page: page('table.MsoNormalTable tr')),
# get all subpages
curried.map(do_request),
$ NIXOS_CONFIG=`pwd`/nixos/modules/virtualisation/virtualbox-image.nix nix-build '<nixpkgs/nixos>' config.system.build.virtualBoxImage
these derivations will be built:
/nix/store/cbkvbfaf87c35rl153v9dni8ismvvynv-nixos-boot-disk.drv
/nix/store/8yb5z43bi4r0wimkq27qi3jq7ibxp7rh-run-nixos-vm.drv
/nix/store/ynk1nfbvqhc0fwnchnx86pgf4gjf1i55-nixos-vm.drv
building path(s) ‘/nix/store/kq1rcyx1lh21nxmsm9rpbis3b4i7j7jv-nixos-boot-disk’
Formatting '/nix/store/kq1rcyx1lh21nxmsm9rpbis3b4i7j7jv-nixos-boot-disk/disk.img', fmt=qcow2 size=41943040 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
QEMU 2.4.0 monitor - type 'help' for more information
(qemu) char device redirected to /dev/pts/0 (label serial0)
builder for ‘/nix/store/cbkvbfaf87c35rl153v9dni8ismvvynv-nixos-boot-disk.drv’ failed with exit code 1
@domenkozar
domenkozar / normiran_sp.py
Last active November 27, 2015 13:28
Izracun prispevkov in akontacije dohodnine za 2016: $ python normiran_sp.py
# vir http://mladipodjetnik.si/podjetniski-koticek/racunovodstvo/izracun-prispevkov-za-samozaposlene-osebe-v-letu-2014
# 80% normiranih stroskov
NORMIRANI_STROSKI = 0.2
# Za leto 2015 se odsteje 28% od osnove
POPUST_DRZAVE = 0.28
prihodki_2015 = int(input('Prihodki skupaj v 2015: '))
prispevki_2015 = int(input('Placani prispevki na mesec v 2015: '))
prispevki_2015 = prispevki_2015 * 12
BASH PATCH REPORT
=================
Bash-Release: 4.3
Patch-ID: bash43-042
Bug-Reported-by: Nathan Neulinger <nneul@neulinger.org>
Bug-Reference-ID: <558EFDF2.7060402@neulinger.org>
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00096.html
BASH PATCH REPORT
=================
Bash-Release: 4.3
Patch-ID: bash43-042
Bug-Reported-by: Nathan Neulinger <nneul@neulinger.org>
Bug-Reference-ID: <558EFDF2.7060402@neulinger.org>
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00096.html
let
pkgs = import <nixpkgs> {};
in
pkgs.stdenv.mkDerivation rec {
name = "IPMIView-${version}";
version = "20150909";
src = pkgs.fetchurl {
url = "ftp://ftp.supermicro.com/utility/IPMIView/Linux/IPMIView_V2.10.2_bundleJRE_Linux_x64_${version}.tar.gz";
sha256 = "1zqg0rhi74gb8vkhfndp2h39dfih5d6y6lm8qlgg9pcnyfm5mk1v";
<uuid>0acc497e-040a-4f6f-8e74-eda6078a1965</uuid>
<name>instance-00000001</name>
<memory>1048576</memory>
<memoryBacking>
<hugepages>
<page size="2048" nodeset="0" unit="KiB"/>
</hugepages>
</memoryBacking>
<numatune>
<memory mode="strict" nodeset="0"/>
@domenkozar
domenkozar / default.nix
Last active April 5, 2016 11:21
snabb-nix-bench
{ master ? (builtins.fetchTarball https://github.com/snabbco/snabb/tarball/master)
, next ? (builtins.fetchTarball https://github.com/snabbco/snabb/tarball/next)
, numTimesRunBenchmark ? 3
, pkgs ? (import <nixpkgs> {})}:
with pkgs;
with pkgs.lib;
let
# runs the benchmark without chroot to be able to use pci device assigning