Skip to content

Instantly share code, notes, and snippets.

Tomáš Kafka tkafka

Block or report user

Report or block tkafka

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
tkafka / listAllEventListeners.js
Last active Nov 5, 2019 — forked from dmnsgn/listAllEventListeners.js
List all event listeners in a document
View listAllEventListeners.js
console.table((function listAllEventListeners() {
const allElements ='*'));
allElements.push(document); // we also want document events
const types = [];
for (let ev in window) {
if (/^on/.test(ev)) types[types.length] = ev;
let elements = [];
for (let i = 0; i < allElements.length; i++) {
tkafka /
Last active May 31, 2019 — forked from show0k/
Compile and Install git-lfs on Raspberry Pi (with golang compilation)
set -e
# Get out if git-lfs is already installed
if $(git-lfs &> /dev/null); then
echo "git-lfs is already installed"
tkafka / email od bazose.eml
Last active Apr 4, 2018
U bazose se jako odesilatel zobrazuje ` via`. U nas tam kde podvrhujeme gmail taky: ` via`
View email od bazose.eml
Original Message
Message ID <>
Created at: Fri, Oct 13, 2017 at 10:41 AM (Delivered after 0 seconds)
Subject: - odpoved na inzerat 80580804 - Fitbit Ionic - nejlepsi fitness tracker, novy
SPF: PASS with IP Learn more
DMARC: 'FAIL' Learn more
View weathergraph promo.txt
Weathergraph shows:
🕑 Time, of course :)
🏃 Daily steps
❤️ Current heart rate
⛅️ Precise forecast from (Dark Sky/ coming soon!)
🌡 Hour-by-hour temperature (orange chart at the bottom)
🌧 Hour-by-hour precipitation - rain and snow (blue chart overlay)
☁️ Hour-by-hour ☁️ cloudiness (cloud cover) and ☀️ sunshine (clouds on top + sun rays)
🌤 Daily minimum and maximum (overlaid above chart)
tkafka /
Created Jul 8, 2016
d3.v4 treemap update example

Each pixel represents approximately one byte.

tkafka /
Last active May 29, 2016
Apifier result downloader. Usage: bash apifier-get-results <execution_id>
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Usage: bash apifier-get-results <execution_id>"
exit 1
tkafka /
Last active Oct 8, 2016
Optimizing app size (for aplite): script to show code space size for every function. I noticed that you can read size of every function from build/ So, here's a script to do it :)).
#!/usr/bin/env bash
cat ./build/ |
# pick important part of file
sed -n -e "/^ \*(\.text\.\*)/,/^ \*(\.rodata)/p" |
# remove first and last line
sed -e "1d" -e "\$d" |
# ensure every function is on single line:
tkafka / LICENSE.txt
Last active Sep 5, 2019
Drop-in replacement for ReactCSSTransitionGroup that uses velocity.js instead of CSS transforms. Add your own transitions to `transitions` hash.
View LICENSE.txt
The MIT License (MIT)
Copyright (c) 2014 Tomas Kafka
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
tkafka / Hiding pane with native scroll.html
Created Oct 29, 2014
Native-like crude touch sliding panel with zepto + velocity.
View Hiding pane with native scroll.html
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>scroll and touchmove - jsFiddle demo</title>
<script type="text/javascript" src="//"></script>
<script type="text/javascript" src="//"></script>
View zepto-add-innersize.js
(function($) {
// Add inner and outer width to zepto (adapted from
var ioDim = function(dimension, includeBorder) {
return function (includeMargin) {
var sides, size, elem;
if (this) {
elem = this;
size = elem[dimension]();
sides = {
width: ["left", "right"],
You can’t perform that action at this time.