Skip to content

Instantly share code, notes, and snippets.

View tino's full-sized avatar

Tino de Bruijn tino

View GitHub Profile
@tino
tino / github_kanbanize.py
Created October 16, 2019 09:17
Simple app (GCP function) to add link to PR with Kanbanize card number to the card
import hashlib
import hmac
import logging
import os
import re
import sys
from typing import Dict
import flask
import requests
@tino
tino / main.py
Created December 5, 2018 20:24
Master with worker processes in Python asyncio
#!/usr/bin/env python3.6
# or higher
import asyncio
import random
import signal
import subprocess
import sys
NUM_WORKERS = 2
@tino
tino / keybase.md
Created October 24, 2018 11:48
keybase.md

Keybase proof

I hereby claim:

  • I am tino on github.
  • I am tinodb (https://keybase.io/tinodb) on keybase.
  • I have a public key ASCb_mSW_nMpcTZlhGpWkI375rTKqPTxkAT_xLmTJK8pGgo

To claim this, I am signing this object:

#!/usr/bin/env python
import os
import re
import subprocess
import sys
modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)')
CHECKS = [
English Reasons why the English language is so hard to learn:
1) The bandage was wound around the wound.
2) The farm was used to produce produce.
3) The dump was so full that it had to refuse more refuse.
4) We must polish the Polish furniture.
5) He could lead if he would get the lead out.
6) The soldier decided to desert his dessert in the desert.
7) Since there is no time like the present, he thought it was time to present the present.
8) A bass was painted on the head of the bass drum.
@tino
tino / Email headers
Created February 14, 2016 04:20
Spamassassin testing differs when input from MTA vs spamc cmdline
To: [email protected]
Content-Type: multipart/alternative; boundary=------------01483740197494617322076
X-Spam-Level: ***
Mime-Version: 1.0
X-Spam-Status: No, score=3.5 required=5.0 tests=HTML_MESSAGE,POOR_DOMAIN, PYZOR_CHECK,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,T_REMOTE_IMAGE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0
Return-Path: <[email protected]>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alpha.mydomain.io
Received: from 127.0.0.1 (HELO alpha.mydomain.io) by alpha.mydomain.io (Archiveopteryx 3.2.0) with lmtp id 1454633828-17132-27942/5/50 for [email protected]; Fri, 5 Feb 2016 00:57:08 +0000
Received: (Haraka outbound); Fri, 05 Feb 2016 01:57:08 +0100
Received: from thesequestion.top (thesequestion.top [91.92.108.188]) by alpha.mydomain.io (Haraka/2.7.0) with ESMTP id EC7C2A51-41A1-48A7-BA9A-6CDF35C1916C.1 envelope-from <[email protected]>; Fri, 05 Feb 2016 01:57:06 +0100
# Karma configuration
# Generated on Wed Sep 02 2015 17:21:57 GMT+0200 (CEST)
module.exports = (config) ->
config.set
# base path that will be used to resolve all patterns (eg. files, exclude)
basePath: ""
# frameworks to use
# available frameworks: https://npmjs.org/browse/keyword/karma-adapter
@tino
tino / setup.md
Last active February 28, 2019 06:11
Clean install of OS X El Capitan (based on https://gist.github.com/g3d/2709563)
@tino
tino / admin-cropper.js
Created August 2, 2015 14:10
Using jQuery.guillotine in the Django Admin with Imagekit
window.$ = django.jQuery;
window.jQuery = django.jQuery; // for guillotine
function showCropper(input, output_name, crop_width, crop_height) {
field = $(input);
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('img.cropper').attr('src', e.target.result);
@tino
tino / designer.html
Last active August 29, 2015 14:17
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;