Skip to content

Instantly share code, notes, and snippets.

@kyledrake
kyledrake / gist:d7457a46a03d7408da31
Last active Jan 20, 2022
Creating a self-signed SSL certificate, and then verifying it on another Linux machine
View gist:d7457a46a03d7408da31
# 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 / ferengi-plan.txt
Last active Jan 5, 2022
How to throttle the FCC to dial up modem speeds on your website using Nginx
View ferengi-plan.txt
# 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 / boring.rb
Created Apr 5, 2015
Neocities boring web site detector
View boring.rb
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 Aug 18, 2019
IPFS replication service with one line of unix shell code!
View ipfs-refs-daemon.sh
#!/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 Jul 12, 2019
List of file extensions ever used in the Geocities Archive for src= or href= links.
View geocities-link-extensions.txt
@kyledrake
kyledrake / geocities-archive-virus-scan.txt
Last active Apr 24, 2019
List of "viruses" detected from a clamav scan of the Geocities archive.
View geocities-archive-virus-scan.txt
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 Apr 11, 2019
Script for solving question/answer from Myspace circa 2009
View token.rb
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 Apr 10, 2019
Myspace Dragon Hoard: Count of songs with tagged genre
View song-genres.txt
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 Apr 6, 2019
Myspace dragon hoard faster direct dl (until torrent is fixed)
View dl.sh
#!/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 &
View bird.conf
log syslog all;
router id **MY_IP**;
protocol bgp vultr {
local as 395409;
source address **MY_IP**;
import none;
export all;
graceful restart on;