Skip to content

Instantly share code, notes, and snippets.

### Webscope s.r.o. Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by Webscope s.r.o. or its affiliates (“Webscope.io"). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Webscope.io in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact legal@webscope.io.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to Webscope.io a no

Keybase proof

I hereby claim:

  • I am jvorcak on github.
  • I am vorcak (https://keybase.io/vorcak) on keybase.
  • I have a public key ASCslnMCsCdB1zXAnqI-lb0Ddf2gkTVlau6N3Ry2Wr6HsQo

To claim this, I am signing this object:

@jvorcak
jvorcak / killgunicorn.sh
Last active July 12, 2021 06:27
Kill gunicorn with all of the workers
alias killgunicorn="ps aux | grep gunicorn | awk '{print $2;}' | xargs kill -9 2>/dev/null"
https://andrewjamesjohnson.com/restoring-tmux-sessions/
@jvorcak
jvorcak / join-for-objects.py
Created January 30, 2020 17:02
Python join for objects
from itertools import chain
list(chain.from_iterable((a, 1) for a in ['a', 'b', 'c']))[:-1]
Out: ['a', 1, 'b', 1, 'c']
@jvorcak
jvorcak / gist:395e8705bf0031fe9a43669bc1d15aeb
Created October 16, 2019 06:15
Submitting multiple forms in Django
<form action="" method="post">
{% csrf_token %}
{{ form.as_ul }}
<button type="submit" name="form_1">Submit</button>
</form>
<form action="" method="post">
{% csrf_token %}
{{ form.as_ul }}
<button type="submit" name="form_2">Submit</button>
</form>
@jvorcak
jvorcak / tig.md
Last active October 11, 2019 17:24
tig - Text-mode interface for git

tig - Text-mode interface for git

This is a proposal for #ReactiveConf 2017 open call for Lightning talks.


Do you think that using git command line tool is the most efficient way of interacting with your repository? In this lightning talk, I will introduce tig - the ncurses front-end for git, which will make your interaction with git much more efficient.

tig combines the advantages of the command line and GUI tools like qgit. With a couple of keystrokes, you are

@jvorcak
jvorcak / gist:4751c6a572553ebf3d3738d5f7f5a7e2
Created September 19, 2019 10:07
git diff in real-time
watch --color -n 1 git diff --color
d = {'a':'Apple', 'b':'Banana','c':'Carrot'}
a,b,c = [d[k] for k in ('a', 'b','c')]
a == 'Apple'
b == 'Banana'
c == 'Carrot'
@jvorcak
jvorcak / humanize-duration.js
Last active July 10, 2019 14:37
Humanize duration wrapper
import React from 'react'
import humanizeDuration from "humanize-duration"
const shortEnglishHumanizer = humanizeDuration.humanizer({
language: 'shortEn',
spacer: '',
delimiter: ' ',
languages: {
shortEn: {
y: function() { return 'y' },