Skip to content

Instantly share code, notes, and snippets.

@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@kyledrake
kyledrake / gist:d7457a46a03d7408da31
Last active October 22, 2023 12:25
Creating a self-signed SSL certificate, and then verifying it on another Linux machine
# Procedure is for Ubuntu 14.04 LTS.
# Using these guides:
# http://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/
# https://turboflash.wordpress.com/2009/06/23/curl-adding-installing-trusting-new-self-signed-certificate/
# https://jamielinux.com/articles/2013/08/act-as-your-own-certificate-authority/
# Generate the root (GIVE IT A PASSWORD IF YOU'RE NOT AUTOMATING SIGNING!):
openssl genrsa -aes256 -out ca.key 2048
openssl req -new -x509 -days 7300 -key ca.key -sha256 -extensions v3_ca -out ca.crt
@kyledrake
kyledrake / mime.types
Created April 30, 2023 22:40
mime.types for nginx that works with bluesky resolveHandle
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
application/atom+xml atom;
application/rss+xml rss;
@kyledrake
kyledrake / boring.rb
Created April 5, 2015 23:52
Neocities boring web site detector
require 'rmagick'
require 'pry'
$filtered_sites = []
def web_site_too_blank?(path)
img = Magick::Image.read(path).first
pix = img.scale(1, 1)
average_color = pix.pixel_color(0,0)
@kyledrake
kyledrake / ipfs-refs-daemon.sh
Last active August 18, 2019 18:00
IPFS replication service with one line of unix shell code!
#!/bin/bash
# First, install ncat: http://nmap.org/ncat/
# Usually comes with the 'nmap' package on distributions.
ncat -k -v -l -p 5555 -c 'ipfs refs local | gzip'
# To retrieve on the client machine:
# nc 127.0.0.1 5555 | gunzip | ipfs pin add -r
@kyledrake
kyledrake / geocities-link-extensions.txt
Created July 12, 2019 21:53
List of file extensions ever used in the Geocities Archive for src= or href= links.
@kyledrake
kyledrake / geocities-archive-virus-scan.txt
Last active April 24, 2019 18:21
List of "viruses" detected from a clamav scan of the Geocities archive.
www.geocities.com/CollegePark/Gym/4455/booo.zip: Win.Joke.Jep-1 FOUND
www.geocities.com/CollegePark/Gym/4455/speed.zip: Win.Joke.ProjectCool-1 FOUND
www.geocities.com/CollegePark/Gym/4455/whack.zip: Legacy.Trojan.Agent-372 FOUND
www.geocities.com/CollegePark/Gym/4455/light.zip: Win.Trojan.Agent-229806 FOUND
www.geocities.com/CollegePark/Gym/4455/xo.zip: Win.Trojan.3586487-1 FOUND
www.geocities.com/CollegePark/Gym/4455/funny.zip: Win.Trojan.Joke-1 FOUND
www.geocities.com/CollegePark/Gym/1245/ImageFiles/pro.doc: Doc.Trojan.Marker-1 FOUND
www.geocities.com/CollegePark/Gym/1245/ImageFiles/pro.doc: Doc.Trojan.Mamm-1 FOUND
www.geocities.com/CollegePark/Gym/5740/programas/TESTDEPSICOLOGIADELMIEDO.zip: Win.Joke.Pelotas-1 FOUND
www.geocities.com/CollegePark/Square/6517/Haker/E-edup.ZIP: Win.Trojan.Fedup-1 FOUND
@kyledrake
kyledrake / token.rb
Created April 11, 2019 19:13
Script for solving question/answer from Myspace circa 2009
require 'net/http'
module Myspace
class Token
def self.get_for_song(o = {})
return nil unless o[:artist_id] && o[:album_id] && o[:song_id]
headers = HttpHeader.random_agent 'http://lads.myspace.com/videos/Main.swf'
headers['x-myspace-id'] = "ownerId=#{o[:artist_id]};contentId=#{o[:song_id]},#{o[:album_id]}"
@kyledrake
kyledrake / song-genres.txt
Created April 10, 2019 07:20
Myspace Dragon Hoard: Count of songs with tagged genre
2-step (1904)
A'cappella (2561)
Acousmatic (923)
Acoustic (32511)
Afro-beat (3334)
Alternative (47577)
Ambient (13456)
Americana (5809)
Big Beat (1659)
Black Metal (6109)
@kyledrake
kyledrake / dl.sh
Created April 6, 2019 17:58
Myspace dragon hoard faster direct dl (until torrent is fixed)
#!/bin/bash
wget --tries=0 --continue https://archive.org/download/myspace_dragon_hoard_2010/1.zip &
wget --tries=0 --continue https://archive.org/download/myspace_dragon_hoard_2010/2.zip &
wget --tries=0 --continue https://archive.org/download/myspace_dragon_hoard_2010/3.zip &
wget --tries=0 --continue https://archive.org/download/myspace_dragon_hoard_2010/4.zip &
wget --tries=0 --continue https://archive.org/download/myspace_dragon_hoard_2010/5.zip &
wget --tries=0 --continue https://archive.org/download/myspace_dragon_hoard_2010/6.zip &
wget --tries=0 --continue https://archive.org/download/myspace_dragon_hoard_2010/7.zip &
wget --tries=0 --continue https://archive.org/download/myspace_dragon_hoard_2010/8.zip &