Skip to content

Instantly share code, notes, and snippets.

View rtt's full-sized avatar
🚍
' DROP TABLE user_statuses; --

Rich Taylor rtt

🚍
' DROP TABLE user_statuses; --
View GitHub Profile
from itertools import combinations
from functools import reduce
from operator import mul
def get_input():
with open('1.txt') as f:
inp = f.readlines()
return list(map(int, map(str.strip, filter(None, inp))))
@rtt
rtt / aoc-2020-python-day1.py
Created December 1, 2020 15:35
advent of code 2020 - day 1
def get_input():
with open('1.txt') as f:
inp = f.readlines()
return list(map(int, map(str.strip, filter(None, inp))))
def get_answer():
expenses = get_input()
seen = set()
while expenses:
@rtt
rtt / repo_unsub.py
Created February 20, 2020 17:17
mass github repo subscription delete
import os
import sys
import requests
def get_subscribed_repos_in_organization(organization, personal_access_token):
page = 1
has_more = True
while has_more:
print("GET https://api.github.com/user/subscriptions?per_page=100&page={}".format(page))
response = requests.get('https://api.github.com/user/subscriptions',

Keybase proof

I hereby claim:

  • I am rtt on github.
  • I am arrteetee (https://keybase.io/arrteetee) on keybase.
  • I have a public key ASCb73A1BIuNeI-pg6_hl8nwc-5dcK5_vtsQAXrqNzPhhwo

To claim this, I am signing this object:

br = brides
wi = wired
vg = vogue
gl = glamour
tr = traveller
ta = tatler
hg = house and garden
gq = gq
lo = love
at = ars technica
@rtt
rtt / humans.txt
Last active April 8, 2018 02:19 — forked from jessmatthews/humans.txt
New Humans.txt
# humanstxt.org/
# The humans responsible & technology colophon
# CONDE NAST BRITAIN - DIGITAL
6th and 7th Floor, Vogue House, Mayfair, London.
... occasionally also The Haunch of Venison Yard
# TECH TEAM
{
"action": "search",
"result": true,
"data": [{
"oid": "10412366819",
"can_view": false,
"looking_for_type_id": [1, 2, 3, 4, 5],
"familystatus_": 0,
"sexuality_": 1,
"smoker_": 0,
> ~ dig @8.8.8.8 a spode.me
; <<>> DiG 9.8.5-P1 <<>> @8.8.8.8 a spode.me
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21871
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
//--------------------------------------------------------------------------------------------------
//
// stage 2 of 3
//
// challenge:
// reveal the solution within VM.mem
//
// disclaimer:
// tested in ie 9, firefox 6, chrome 14 and v8 shell (http://code.google.com/apis/v8/build.html),
// other javascript implementations may or may not work.