Skip to content

Instantly share code, notes, and snippets.

View kzar's full-sized avatar
🐈
Bashing the rocks together...

Dave Vandyke kzar

🐈
Bashing the rocks together...
View GitHub Profile
@kzar
kzar / notification-tests-developer.js
Last active December 2, 2019 12:17
Testing Adblock Plus for Chrome notifications
/**
* 1. Append one of these blocks to adblockpluschrome/lib/devtools.js...
*/
// Desktop notification, relentless type, no links
require("notifications").notifications.addNotification({
id: (new Date() | 0).toString(),
type: "relentless",
title: "Notification title",
message: "Notification message"
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@kzar
kzar / telit-pyo.py
Created May 22, 2011 12:05
Script to dump .pyo files from Telit 862 over serial as hex
#
# Script to dump all pyo's on a Telit 862GPS over the serial port as hex.
# (Useful as the unit takes SO long to compile .pyo's.)
#
#
# Copyright 2011 Dave Barker
#
**** MOVED https://github.com/kzar/telit-862-python-tools ****
@kzar
kzar / rs-send-python.py
Created May 12, 2011 15:08
Script to automate Python deployment to Telit GPS unit
#!/usr/bin/python
# Script to send Python scripts to the Round solutions development board
# (Designed for use with the GSM862-GPS and RS-EB-S3 Rev 3)
#
# Idea is that you connect to the Unit through the serial port provided
# using the screen command. You then use this script to have the commands
# and your code sent to screen automatically.
# (For help with screen read this:
# http://www.tigoe.net/pcomp/resources/archives/avr/000749.shtml )
@kzar
kzar / tetris.rb
Created December 16, 2010 16:19
Tetris in Ruby (Dave's first Ruby program)
#!/usr/bin/env ruby
# Dave's Tetris clone, Dave Barker 2010
# (Requires rubygame, rsdl, sdl, sdl_graphics, sdl_ttf and ruby >= 1.9)
# (Make sure you put Chalkduster.ttf if working directory)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@kzar
kzar / fb_helpers.py
Created October 14, 2010 13:34 — forked from droot/fb_helpers.py
Stuff that's missing from the Facebook python SDK
import base64
import hashlib
import hmac
import simplejson as json
def base64_url_decode(inp):
padding_factor = (4 - len(inp) % 4) % 4
inp += "="*padding_factor
return base64.b64decode(unicode(inp).translate(dict(zip(map(ord, u'-_'), u'+/'))))