Skip to content

Instantly share code, notes, and snippets.

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@hellais
hellais / ip-to-asn.py
Last active May 27, 2016 12:27
IP to ASN
#!/usr/bin/env python
# To get GeoIPASNum.dat:
# wget https://geolite.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz && gunzip GeoIPASNum.dat.gz
import sys
import pygeoip
if len(sys.argv) < 2:
print "Usage: path/to/GeoIPASNum.dat [IPs ... ...]"
ips = sys.argv[2:]
gi = pygeoip.GeoIP(sys.argv[1])
for ip in ips:
@ocornut
ocornut / (Archived) imgui_memory_editor.h
Last active March 5, 2026 13:43
Mini memory editor for dear imgui (to embed in your game/tools)
// Mini memory editor for Dear ImGui (to embed in your game/tools)
// Animated GIF: https://twitter.com/ocornut/status/894242704317530112
// THE MEMORY EDITOR CODE HAS MOVED TO GIT:
// https://github.com/ocornut/imgui_club/tree/master/imgui_memory_editor
// Click "Revisions" on the Gist to see old version.
@bnagy
bnagy / gpgmutt.md
Last active December 1, 2025 23:19
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@atcuno
atcuno / gist:3425484ac5cce5298932
Last active March 29, 2026 03:23
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

@magnetikonline
magnetikonline / README.md
Last active April 2, 2026 06:25
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}
@konklone
konklone / digitalgov-third-parties-talk.md
Last active May 27, 2016 12:39
Resources and links from the DigitalGov University talk on "Privacy, Security, and Third Party Web Services"
@hellais
hellais / ooni-api-queries.sql
Created December 14, 2015 21:35
interesting queries for ooni-api
# Interesting DNS Consistency tests
SELECT input, report_id FROM reports WHERE test_name='dns_consistency' AND (test_keys->>'tampering_detected')::bool=true;
# Interesting HTTP requests tests
SELECT input, report_id FROM reports WHERE test_name='http_requests' AND (test_keys->>'body_length_match')::bool=false;
# Interesting tests that indicate a generic failure
@hellais
hellais / benchmark-parsers.py
Created January 18, 2016 18:55
Benchmarking of YAML vs JSON parsing
#!/usr/bin/env python
#
# Running of the script against the following files (OONI reports):
# 87M 2015-12-22.json
# 97M 2015-12-22.yaml
#
# vanilla json: 1.37932395935
# ultra json: 0.421966075897
# simple json: 1.23581790924
# yaml: 193.864903927
@adeekshith
adeekshith / .git-commit-template.txt
Last active November 21, 2025 16:14 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23