Skip to content

Instantly share code, notes, and snippets.


John Markus Bjørndalen jmbjorndalen

View GitHub Profile
jmbjorndalen /
Created Apr 26, 2018
Combining Python 3 asyncio coroutines with thread pool and process pool executors
#!/usr/bin/env python3
# Combining coroutines running in an asyncio event loop with
# blocking tasks in thread pool and process pool executors.
# Based on, but this version runs both
# threads and processes at the same time and interleaves them with asyncio coroutines.
# All appears to be working.
jmbjorndalen / pebble-time-kickstarter-info
Last active Aug 29, 2015
Quick and dirty tampermonkey hack to view some of the hidden information on the Pebble Time Kickstarter webpage
View pebble-time-kickstarter-info
// ==UserScript==
// @name pebble kickstarter test
// @namespace http://your.homepage/
// @version 0.2
// @description Adds hidden tracking info to the kickstarter page (and logs it to the js console)
// @author John Markus Bjørndalen
// @match*
// @grant none
// ==/UserScript==
View ScriptCraft-falldamage1
events.damage(function(event) {
// Wearing a pumpkin on your head protects you from fall damage
var src = event.getDamageSource();
if (src.getDamagetype() == {
var def = event.getDefender()
var isPlayer = (def instanceof;
if (isPlayer) {
var inv = def.getInventory();
var head = inv.getSlot(39);
if (head) {