Skip to content

Instantly share code, notes, and snippets.

@stucka
stucka / bing-test.ipynb
Created January 31, 2024 17:41
Get Bing's cached version of a URL
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stucka
stucka / bluesky.md
Last active October 19, 2023 14:44
Getting started on Bluesky

Use this code at bsky dot app.

A good way to get started is to identify some of the nexus accounts, people near the center of your social groups on Twitter, then look for them on Bluesky. If you find them, you can follow them -- but consider also going through their lists of who they're following, and who they follow, to find more of your crowd. Think about whether you really want to follow them, instead of automatically following them. Consider repeating this step periodically as Bluesky grows, because you may find more of your people have snuck in.

There was a web site called Fedifinder that tried to find your Twitter crowd in both Mastodon and Bluesky. It's been down the last couple times I've tried it, alas.

LifeHacker referred me to a Chrome extension I haven't tried yet, which tries to identify your Twitter people on Bluesky so you can follow 'em: https://chrome.google.com/webstore/detail/sky-follower-bridge/behhbpbpmailcnfbjagknjngnfdojpko

Block liberally. Don't feed the trolls. Keep it from turnin

@stucka
stucka / gist:338a8f4c194313fa1ad0d92c81b2ca3b
Last active August 30, 2023 12:37
Setting up a new Linux box
Change root password
make a regular user
adduser stucka
usermod -aG sudo stucka
Set up IP with a DYNDNS entry
Save profile in Putty/SSH client
apt-get update
apt-get dist-upgrade
apt-get clean
apt-get autoremove
@stucka
stucka / response.txt
Created May 17, 2022 19:11
Spam message response from Derek Willis
Recently? Well, to be honest things could be better, what with my cousin getting arrested for trespassing and defacing public property (we told him he literally can't ski down the front of a museum, no matter how much of a slope it has) and then the tractor wn't start, which is tough because it's our main form of transportation when it rains, and to top it off my gout has returned, but in my left elbow. Why is there no gout vaccine?
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stucka
stucka / combineuniquecsvs.py
Created May 22, 2020 15:10
Combinue unique CSV rows, while destroying row order and clobbering multiline entries
# import csv
from glob import glob
import os
from sys import exit
import datetime
print("This will NOT work with CSVs that have multiline entries.")
print("This will completely screw with the order of your CSVs.")
print("This will risk making the Cubs win another World Series, splitting us into another alternative universe.")
@stucka
stucka / save-stuff-to-zips.py
Created April 17, 2020 19:47
Save stuff to ZIPs
import zipfile
import os
import glob
zipfilename = "/Users/mstucka/Dropbox/somedata.zip"
sourcedir = "somedata/"
filesalreadygot = []
if os.path.exists(zipfilename):
with zipfile.ZipFile(zipfilename, 'r') as myzip:
@stucka
stucka / csv-to-html.py
Created October 8, 2019 15:35
CSV to HTML converter (terrible)
def csv-to-html(sourcefilename)
# Try a csv-to-HTML converter?
from slugify import slugify
import os
import csv
currentdir = os.path.dirname(".")
# sourcefilename = "scraperreport.csv"
with open(sourcefilename, "r") as f:
@stucka
stucka / compileapachelog.py
Created September 8, 2019 13:58
Compile Apache access logs from archives
#!/bin/python3
import gzip
import glob
gzippedfiles = list(glob.glob("access.log*.gz"))
with open("accesscompiled.log", "wb") as outfile:
with open("access.log", "rb") as infile:
outfile.write(infile.read())