Skip to content

Instantly share code, notes, and snippets.

@adacable
adacable / Commentary and Fact Check of Dr. Will Powers’s Transgender Care Presentation.html
Created November 9, 2022 12:22
Copy of the removed-under-legal-threat fact check of will powerses trans health presentation
<!DOCTYPE HTML >
<head>
<title>
Commentary and Fact Check of Dr. Will Powers’s Transgender Care Presentation
</title>
</head>
<body>
<h1 id="commentary-and-fact-check-of-dr-will-powerss-transgender-care-presentation">
import requests
from bs4 import BeautifulSoup
urlbase = "https://www.powercut105.com/FindOperator?Postcode="
def getalpha(postcode):
postcodeList = postcode.split(" ")
url = urlbase + "+".join(postcodeList)
r = requests.get(url)
return BeautifulSoup(r.content,"html.parser").find("span",class_="highlight_blockletter").text
########### GUIDANCE
# tweet deleter that deletes all of the tweets in an archive(twitter often leaves a few of your most recent ones out of the archive- use an api based deleter to do these) from the first ones you tweeted to the latest.
# no fancy options(like checking for highly favd tweets/etc)
# common errors: twitter won't let you unretweet tweets from accounts you don't have access to- expect a few "Sorry, you are not authorized to see this status" errors at the bottom/as you go through
# tweets that aren't deleted are shown twice: once as an error message as you progress through, and once at the bottom in a summary of all errors.
# takes about 1h/10k tweets
# hacky and ugly don't judge me
############ USAGE GUIDE
# download your twitter archive and unzip it.
# set the archive_folder variable in the "edit this" section to the path you unzipped it to
function(d, s, a, i, j, r, l, m, t) {
try {
l = d.getElementsByTagName('a');
t = d.createElement('textarea');
for (i = 0; l.length - i; i++) {
try {
a = l[i].href;
s = a.indexOf('/cdn-cgi/l/email-protection');
m = a.length;
if (a && s > -1 && m > 28) {
@adacable
adacable / gist:261ba535fa3d0c0d6dcf
Created June 17, 2014 00:20
Print yourself a scarf.
import processing.pdf.*;
//set up some constants
Boolean pdfOut = true;//are we outputting to pdf or to screen?
float averageDistance = 72*2 ;//how far between points, in inches/72 or pixels depending on output
void setup() {
background(255, 255, 255);
if (pdfOut) {
size(1684, 2383, PDF, "output.pdf");
}
else {
@-moz-document domain("twitter.com") {
.global-nav .container{
max-width:890px;
}
#global-actions>li{
width:96.6666667px;
}
#global-actions > li > a{
padding:0;
display:block;
void drawStep(int xStepIn){
drawGrid(8,xStepIn);
};
//helpers
void drawGrid(int xnum, int xOffset){
//draws xnum by ynum modules on the canvas, sperated by xgutter and ygutter
int yOffset = (height % ( width / xnum ))/2 ;
int ynum = (height/( width / xnum ));
for (int w = -1; w < xnum; w++) {
for (int d = -1; d < ynum; d++){
@adacable
adacable / gist:10851879
Created April 16, 2014 10:53
twitter stylsheet fixes
.global-nav .container{
max-width:890px;
}
#global-actions>li{
width:96.6666667px;
}
#global-actions > li > a{
padding:0;
display:block;
margin:0 auto;