Skip to content

Instantly share code, notes, and snippets.

View valid-wordle-words.txt
aahed
aalii
aargh
aarti
abaca
abaci
aback
abacs
abaft
abaka
View scotrail-combine
#!/usr/bin/env fish
set N 2
set FILES 1838 1024 0489 0063
curl -o '#1.mp3' 'https://matteason.github.io/scotrail-announcements-june-2022/announcements/{'(string join , $FILES)'}.mp3'
mp3wrap sr$N.mp3 (string split ' ' (string join '.mp3 ' $FILES).mp3)
@dracos
dracos / microproxy.py
Created Dec 18, 2016
A very small python HTTP proxy
View microproxy.py
#!/usr/bin/env python
"""
Microproxy
This code is based on http://pastebin.com/mdsAjhdQ based on code based on microproxy.py written by ubershmekel in 2006.
Microproxy is a very small HTTP proxy. It relays all bytes from the client to the server at a socket send and recv level.
It looks at the Host: header to recognise where to connect to.
"""
@dracos
dracos / twitter-filters.txt
Last active Jan 21, 2022
uBlock Origin filters to remove things from the Twitter website
View twitter-filters.txt
twitter.com##section:has(> h1:has-text(Trending now))
twitter.com##div:has(> aside[aria-label="Who to follow"])
twitter.com##nav a:has-text(Explore)
twitter.com##nav a[href="/explore"]
twitter.com##main:has(div[style*="hex"]:has(a[href*="nft"])) ! entire profile page
twitter.com##article:has(div[style*="hex"])
OR if you don't want to block quoted tweets of those tweets:
twitter.com##article:has(div[style*="48px"]:has(div[style*="hex"]))
@dracos
dracos / change.py
Last active May 4, 2021
Update Twitter profile pic
View change.py
import os, sys
import tweepy
# config.py contains all the all-caps variables used below
from config import *
localfile = os.path.join(LOCALDIR, 'count')
try:
fp = open(localfile)
View east-lothian-with-buffer.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View split_postcode_lad.csv
We can't make this file beautiful and searchable because it's too large.
Postcode,LAD GSS code
AB10 7QB,S12000033
AB10 7QB,S12000034
AB12 3GQ,S12000033
AB12 3GQ,S12000034
AB12 3GW,S12000033
AB12 3GW,S12000034
AB12 3LN,S12000033
AB12 3LN,S12000034
AB12 3LP,S12000033
View gist:e48d6feb25d3f7a8d706a2945fbf1930
// ==UserScript==
// @name Collapse project columns
// @namespace mysociety.github.projects.collapse
// @description Collapse project columns (based on https://gist.github.com/yuyuvn/268c754325e945ceda24e4ce661a27ce)
// @include https://github.com/*/*/projects/*
// @version 1.0
// @grant none
// ==/UserScript==
document.querySelectorAll(".js-details-container").forEach(function(node){
View new-councils-april-2019.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View new-wards-april-2019-only.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.