Skip to content

Instantly share code, notes, and snippets.

@willemolding
willemolding / ImageConverter.js
Created Oct 8, 2017
PNG to TXI javascript image converter (from Fitbit Studio)
View ImageConverter.js
/* eslint no-bitwise: 0 */
import PNGReader from 'png.js';
import TZ1200RLE from './TZ1200RLE';
export function readPNG(imageBytes) {
const reader = new PNGReader(imageBytes);
return new Promise((resolve, reject) => {
reader.parse((err, data) => {
View vodafone.md

Trashing the Vodafone Station

How to replace the Vodafone Station with your very own router

Vodafone forces its customers to use their modem/router, the "Vodafone Station": using any other router is impossible because authentication is being done via a custom PPPoE setup.
In the PPPoE packet there is a field named Host-Uniq which is used to separate packets from different PPPoE sessions: Vodafone requires the Station serial number to be put in this field as authentication.

Hardware setup

A Linux router with root access is needed to replace the Station with. With an xDSL connection a modem with a custom firmware like OpenWrt has to be used, most likely one based on a Lantiq SoC.
For a FTTH internet connection then every machine with at least two gigabit ethernet interface and a decent CPU will do it.

View export_google_starred_locations.py
# -*- coding: utf-8 -*-
"""
Go to Google Bookmarks: https://www.google.com/bookmarks/
On the bottom left, click "Export bookmarks": https://www.google.com/bookmarks/bookmarks.html?hl=en
After downloading the html file, run this script on it to generate a KML.
Slight modification of regex to get lat/lng from web page from: https://gist.github.com/endolith/3896948=
"""
View HERO4BlackWifiHacking2.md

#GoPro HERO4 Black Wifi Hacking, ep 2

By Maelstrom Napalm, @odwdinc, Konrad Iturbe and fraannk (@ifraaannk)

###Status URL:

http://10.5.5.9/gp/gpControl/status

####Protune EV compensation: Value | URL

@KonradIT
KonradIT / Hero4BlackWifi.md
Last active Dec 22, 2020
Wifi hacking for HERO4 Black
View Hero4BlackWifi.md
@endolith
endolith / export_google_starred_locations.py
Created Oct 16, 2012
Export Google Maps starred locations
View export_google_starred_locations.py
# -*- coding: utf-8 -*-
"""
Go to Google Bookmarks: https://www.google.com/bookmarks/
On the bottom left, click "Export bookmarks": https://www.google.com/bookmarks/bookmarks.html?hl=en
After downloading the html file, run this script on it to generate a KML.
"""
@DnaX
DnaX / getCNSPersonalData.py
Created Mar 9, 2012
CNS smart card PersonalData extractor (by PKCS#11 library)
View getCNSPersonalData.py
#!/usr/bin/env python
# Uses OpenSC pkcs11 generic library and pkcs11 python wrapper
# Print personal data from che italian CNS smart card (new health card)
from PyKCS11 import LowLevel
import sys
def getPersonalData(p11, slot):
@3v1n0
3v1n0 / python.vapi
Created Oct 12, 2011
A simple test to use python code from Vala
View python.vapi
[CCode (lower_case_cprefix = "Py_", cheader_filename = "Python.h")]
namespace Python
{
public void Initialize ();
public void Finalize ();
[CCode (lower_case_cprefix = "PyRun_")]
namespace Run
{
public void SimpleString (string @string);