Skip to content

Instantly share code, notes, and snippets.


Jiri Kuncar jirikuncar

Block or report user

Report or block jirikuncar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jirikuncar / style.css
Created Oct 31, 2019
Number headers with CSS
View style.css
body {
counter-reset: h2counter;
h1 {
counter-reset: h2counter;
main h2:before {
content: counter(h2counter) ".\0000a0\0000a0";
View .bash_profile
#!/usr/bin/env bash
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
# Path to the bash it configuration
export BASH_IT="${HOME}/.bash_it"
jirikuncar / Dockerfile
Last active Mar 26, 2019
Traefik with ForwardAuth middleware
View Dockerfile
FROM python:3.7-alpine
RUN pip install flask
COPY /code/
CMD ["flask", "run", "-h", ""]
import collections
import datetime
import logging
from goblin import properties
logger = logging.getLogger(__name__)
CARD_MAPPING = {'Cardinality.single': 'Cardinality.SINGLE',
jirikuncar /
Last active Mar 14, 2020
Traefik - header matching

Traefik routing

Proxy to services based on Accept header.


docker-compose up -d


jirikuncar / .a
Last active Mar 29, 2019
Remote Jupyter Kernel at CSCS
View .a


Direct Access to Computing Systems

  1. Get an Account and store your account name export CSCS_USER=unixname.
  2. Configure direct access to the computing system. You can use the ssh_config template:
    $ cat >> ~/.ssh/config <<EOF
    Host *
     AddKeysToAgent yes  # only for MacOS
jirikuncar / README.rst
Last active Sep 28, 2016
PyLint checker for number of calls inside try blocks.
View README.rst

Download and install pylint

$ pip install pylint

Run pylint with an additional plugin on a file

$ pylint --load-plugins=try_calls

In case you is not recognized add it to PYTHONPATH.

jirikuncar /
Created Aug 22, 2016
GitHub: number of commits since last tag
import sys
from getpass import getpass
import github3
def main(_, username, name='inveniosoftware'):
gh = github3.login(username, password=getpass())
org = gh.organization(name)
for repo in org.repositories():
tags = list(repo.tags(1))
View shot'em'
# Add your Python code here. E.g.
import math
import random
from microbit import *
enemies = [[1, 0, 0.05]]
shots = []
game = True
killed = 0
jirikuncar /
Created Jun 23, 2016 — forked from somebox/
Set up an OSX machine from zero to awesome. Uses Homebrew (and cask, fonts, etc). Focused on Ruby/Rails development, includes rvm, xquartz, editor fonts, sublime text, and many tools.
# A script to set up a new mac. Uses bash, homebrew, etc.
# Focused for ruby/rails development. Includes many utilities and apps:
# - homebrew, rvm, node
# - quicklook plugins, terminal fonts
# - browsers: chrome, firefox
# - dev: iterm2, sublime text, postgres, chrome devtools, etc.
# - team: slack, dropbox, google drive, skype, etc
You can’t perform that action at this time.