Skip to content

Instantly share code, notes, and snippets.

View ties's full-sized avatar

Ties de Kock ties

  • The Netherlands
View GitHub Profile
@sgillies
sgillies / geo_interface.rst
Last active May 7, 2025 20:01
A Python Protocol for Geospatial Data

Author: Sean Gillies Version: 1.0

Abstract

This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.

Introduction

#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@preetum
preetum / z3color.py
Created January 23, 2014 01:53
Determines the chromatic number of graphs (and their coloring), using Microsoft's Z3 SMT solver.
## This script uses Microsoft's Z3 SMT solver
## to determine the chromatic number (and corresponding coloring) of graphs.
##
## Author: Preetum Nakkiran, 2014
from z3 import *
def color(V, E, k):
"""
Attempt to color the graph G(V, E) with k colors
@basilfx
basilfx / cache.start
Created May 14, 2014 09:16
Flashcache Upstart script
#!/bin/sh
# $2 is the /dev/mapper/IDENTIFIER
# $3 is the name of the cache, as specified by Flashcache
# Tune parameters
sysctl -w "dev.flashcache.$3.fallow_delay=3600"
sysctl -w "dev.flashcache.$3.dirty_thresh_pct=80"
# Verify disk structure
@rraptorr
rraptorr / ct-submit.py
Last active November 26, 2024 08:13
Simple Certificate Transparency certificate submission client
#!/usr/bin/python
import sys
import argparse, json, base64, struct
import urllib2
from datetime import datetime
LOGS = {
'icarus': 'https://ct.googleapis.com/icarus',
'pilot': 'https://ct.googleapis.com/pilot',
@esquireofoz
esquireofoz / cloudfront_pop_locations.psv
Created September 29, 2016 12:41
AWS CloudFront POPs by City and Region
AMS1 | Amsterdam, The Netherlands | Europe
AMS50 | Amsterdam, The Netherlands | Europe
ARN1 | Stockholm, Sweden | Europe
ATL50 | Atlanta, Georgia | United States
ATL52 | Atlanta, Georgia | United States
BOM2 | Mumbai, India | India
BOM51 | Mumbai, India | India
CDG3 | Paris, France | Europe
CDG50 | Paris, France | Europe
DEL51 | Paris, France | Europe

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@probonopd
probonopd / CX300.md
Last active October 12, 2024 18:20
Polycom CX300 Linux HID

Polycom CX300 under Linux

The Polycom CX300 and similar Plantronics Calisto 540 (P540-M), snom UC600 are originally optimized for Microsoft Lync (Skype for Business) for Windows and Mac but can also be used with Linux. It shows up as a USB audio playback and recording device (this part works immediately out of the box) plus some USB HID (this needs to be made work; see below).

polycom

Questions

Please use the comments function below if you know the answer to any of the questions

@milesbxf
milesbxf / monzo-alertmanager-config.yaml
Last active April 16, 2025 20:12
Monzo's Alertmanager Slack templates
###################################################
##
## Alertmanager YAML configuration for routing.
##
## Will route alerts with a code_owner label to the slack-code-owners receiver
## configured above, but will continue processing them to send to both a
## central Slack channel (slack-monitoring) and PagerDuty receivers
## (pd-warning and pd-critical)
##