Skip to content

Instantly share code, notes, and snippets.

View dxlbnl's full-sized avatar

Dexter dxlbnl

View GitHub Profile
@dxlbnl
dxlbnl / gist:3378262
Created August 17, 2012 11:50
Pyjaco IST design
import ast
def transform(node, transformations):
"""
Match node a node in transformations.
"""
match = transformations.get(type(node))
if match:
@dxlbnl
dxlbnl / ibood_tracker.py
Last active December 14, 2015 07:08
Ibood hunt tracker
# -*- coding: utf-8 -*-
import re, json
import urllib2
import sys, time, datetime
cursor = u"|"
class Poller(object):
resp_lines = [
str(range(i)) for i in range(20, 50,3)
]
width = 80
space = " "
"""
The proper way ?
from functools import partial
from itertools import chain, ifilter, islice, izip_longest
import time
# First approach
@dxlbnl
dxlbnl / missie.md
Last active May 19, 2016 15:27
Megalomaan platform

Zoek HHG quote over politiek

Missie statement

  • Electoraal gewin vs pragmatisme.
  • Aan IT kwesties beginnen (om vanuit specialisme te kunnen spreken)
  • Privacy en Transparantie met de komst van het internet
  • Dat dingen goed worden geregeld op IT gebied. Opensource,
  • Verificatie en falsificatie van overheidsstukken mbt ^, ^^
  • Actief op publicaties van de overheid gaan verifieren. En daarop actie ondernemen;
@dxlbnl
dxlbnl / component.html
Last active January 19, 2017 15:35 — forked from Rich-Harris/component.html
Clock
<svg viewBox='0 0 100 100'>
<!-- first create a group and move it to 50,50 so
all co-ords are relative to the center -->
<g transform='translate(50,50)'>
<circle class='clock-face' r='48'/>
<!-- markers every minute (major markers every 5 minutes) -->
{{#each minor as tick, i}}
<line class='minor' y1='42' y2='45' transform='rotate( {{
@dxlbnl
dxlbnl / Item.html
Created January 24, 2017 13:44
Nesting updating components with svelte
<li>{{value}}</li>
<script>
export default {
data() {
return {
value: 'XX'
};
},
onrender() {
#!/usr/bin/python3
import datetime
from dateutil.parser import parse as parsedate
import json
import re
# Als je dit onder python3 wil draaien, moet je even 'python-dateutil' installeren
isoformat_regex = re.compile(r'(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{6})')

Keybase proof

I hereby claim:

  • I am neoel on github.
  • I am d3xt3r (https://keybase.io/d3xt3r) on keybase.
  • I have a public key ASAbbI7aVT7iDl2bJDGUZGc6NuKFXofUOs0t6JQfmkZS5Ao

To claim this, I am signing this object:

@dxlbnl
dxlbnl / psql
Created September 1, 2017 14:42
queue=> \dt
List of relations
Schema | Name | Type | Owner
--------+----------------------------+-------+-----------
public | __diesel_schema_migrations | table | nerdalize
public | runs | table | nerdalize
public | tasks | table | nerdalize
public | workloads | table | nerdalize
(4 rows)