Skip to content

Instantly share code, notes, and snippets.

View chris-short's full-sized avatar

Chris "Not So" Short chris-short

View GitHub Profile
@navinpai
navinpai / sopa_emergency.txt
Created January 3, 2012 13:44
SOPA Emergency IP list
SOPA Emergency IP list:
So if these ass-fucks in DC decide to ruin the internet, here’s how to access your favorite sites in the event of a DNS takedown
tumblr.com 174.121.194.34
wikipedia.org 208.80.152.201
# News
bbc.co.uk 212.58.241.131
aljazeera.com 198.78.201.252
@johntyree
johntyree / getBlockLists.sh
Last active March 9, 2024 12:32
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@d-schmidt
d-schmidt / redirectExample.go
Last active March 12, 2024 08:04
How to redirect HTTP to HTTPS with a golang webserver.
package main
import (
"net/http"
"log"
)
func redirect(w http.ResponseWriter, req *http.Request) {
// remove/add not default ports from req.Host
target := "https://" + req.Host + req.URL.Path
if len(req.URL.RawQuery) > 0 {
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

#!/usr/bin/env bash
#
# Python MAC OSX Librato Agent install script
# Version: 0.0.2
# Author: Librato
#
# run:
# curl -s "https://raw.githubusercontent.com/librato/python-librato-agent/master/sh/install.sh?" | bash
#
@astrikos
astrikos / stale_security_groups.py
Created November 9, 2017 15:52
Script to detect stale AWS security groups
#!/usr/bin/env python
import boto3
import argparse
class StaleSGDetector(object):
"""
Class to hold the logic for detecting AWS security groups that are stale.
"""
def __init__(self, **kwargs):
@realgenekim
realgenekim / split-and-count.cljs
Last active June 9, 2020 15:06
Create sorted word frequencies for word clouds, using Lumo and ClojureScript
;; using lumo for ClojureScript: https://github.com/anmonteiro/lumo
;;
;; https://www.wordclouds.com/
;; - size: 1920x1080
;; - size is typically around -45
;; - shape: rectangle
;; - theme: black on white
;; - font: Ariel
;;
;; PS: Over the last 30 years, I've probably written this program over
# These filters are based on email that Tim Hockin sent to kubernetes-dev a
# while ago on how to bring some sanity to github notifications with Kubernetes.
#
# https://groups.google.com/forum/#!msg/kubernetes-dev/5qU8irU7_tE/aZov0LpCBwAJ
#
# This file can be processed with https://github.com/mesozoic/gmail-yaml-filters
# Mark all k8s email
- match:
any:
@sethvargo
sethvargo / README.md
Last active October 12, 2018 19:38
A simple script for installing most HashiCorp tools (with GPG verification)
@rothgar
rothgar / install.sh
Created April 4, 2018 17:07
Code on Chromebook
#!/bin/sh
# Follow instructions here to enable dev mode and start VM
# https://github.com/lstoll/cros-crostini/blob/master/README.md
sudo apt-get update
sudo apt-get install -y libasound2 libxss1 wget
wget -qO- https://go.microsoft.com/fwlink/?LinkID=620884 | tar xvz
# Launch code