Skip to content

Instantly share code, notes, and snippets.

@zedeus
zedeus / following.py
Created September 2, 2019 21:06
Fetch Twitter following list
import requests, re, sys
url = "https://mobile.twitter.com/{}/following"
cursor = ""
usernames = []
first = True
if len(sys.argv) < 2:
print("Usage: python followers.py <username>")
quit(1)
@zedeus
zedeus / httpclient.nim
Last active September 16, 2018 00:21
Hack to reduce memory overhead on httpclient post when sending files
proc lightformat(p: var MultipartData): string =
if p == nil or p.content.len == 0:
return
# Create boundary that is not in the data to be formatted
var bound: string
while true:
bound = $random(int.high)
var found = false
for s in p.content:
@zedeus
zedeus / postfile.nim
Created September 11, 2018 02:14
Hack to reduce memory overhead when sending a file via post
proc lightformat(p: var MultipartData): string =
if p == nil or p.content.len == 0:
return
# Create boundary that is not in the data to be formatted
var bound: string
while true:
bound = $random(int.high)
var found = false
for s in p.content:
@zedeus
zedeus / titlepage.tex
Created December 17, 2016 20:52
LaTeX thesis title page
\documentclass[letterpaper]{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{epigraph}
\usepackage{lipsum}
\usepackage[danish]{babel}
\renewcommand\epigraphflush{flushright}
\renewcommand\epigraphsize{\normalsize}
\setlength\epigraphwidth{0.72\textwidth}