Skip to content

Instantly share code, notes, and snippets.

View simonline's full-sized avatar

Simon Liedtke simonline

View GitHub Profile
#!/usr/bin/env python3
import inspect
import logging
from devguard_carrier import CarrierStream, CarrierError, SizeT, Slice, StreamConfig, IOUnixAsync, CarrierEndpoint, \
CarrierIdentity, CarrierSync, CarrierStream, HpackDecoderIterator
from devguard_carrier import err_make, io_unix_make, carrier_endpoint_from_home_carriertoml, \
carrier_identity_identity_from_str, carrier_sync_start, carrier_sync_connect, carrier_sync_wait, \
carrier_endpoint_close, hpack_decoder_decode, hpack_decoder_next
@simonline
simonline / Integrate WECHANGE with wordpress
Last active July 29, 2020 18:22
Some useful code snippets when integrating WECHANGE with Wordpress
// Register getURLVar for jQuery
$.extend({
getUrlVars: function(){
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++)
{
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];