Skip to content

Instantly share code, notes, and snippets.

View ginjo's full-sized avatar

William Richardson ginjo

View GitHub Profile
@mikepea
mikepea / pr_etiquette.md
Last active December 25, 2025 23:58
Pull Request Etiquette

Pull Request Etiquette

Why do we use a Pull Request workflow?

PRs are a great way of sharing information, and can help us be aware of the changes that are occuring in our codebase. They are also an excellent way of getting peer review on the work that we do, without the cost of working in direct pairs.

Ultimately though, the primary reason we use PRs is to encourage quality in the commits that are made to our code repositories

Done well, the commits (and their attached messages) contained within tell a story to people examining the code at a later date. If we are not careful to ensure the quality of these commits, we silently lose this ability.

@prokizzle
prokizzle / default.conf
Last active March 28, 2023 02:10
Working Nginx Config for Faye over SSL
upstream faye_server {
server 127.0.0.1:9292;
}
server {
# listen 80;
listen 443 ssl;
server_name your-faye-server.com;
@ramn
ramn / socat_http_echo_server.sh
Last active September 26, 2023 12:22
Socat HTTP echo server
#!/bin/bash
socat -v -T0.05 tcp-l:8081,reuseaddr,fork system:"echo 'HTTP/1.1 200 OK'; echo 'Connection: close'; echo; cat"
@CMCDragonkai
CMCDragonkai / socat_server.sh
Last active August 6, 2021 22:03
Socat Simple HTTP Server #cli #network
socat \
-v -d -d \
TCP-LISTEN:1234,crlf,reuseaddr,fork \
SYSTEM:"
echo HTTP/1.1 200 OK;
echo Content-Type\: text/plain;
echo;
echo \"Server: \$SOCAT_SOCKADDR:\$SOCAT_SOCKPORT\";
echo \"Client: \$SOCAT_PEERADDR:\$SOCAT_PEERPORT\";
"
@thecodingmonkey-zz
thecodingmonkey-zz / docker-size.sh
Created December 11, 2015 11:52
List all docker containers + volume sizes
#!/bin/sh
for d in `docker ps -a | awk '{print $1}' | tail -n +2`; do
d_name=`docker inspect -f {{.Name}} $d`
echo "========================================================="
echo "$d_name ($d) container size:"
sudo du -d 2 -h /var/lib/docker/aufs | grep `docker inspect -f "{{.Id}}" $d`
echo "$d_name ($d) volumes:"
@shmup
shmup / torrents.md
Last active December 14, 2025 05:17
transmission blocklist guide

Transmission Blocklist

The Transmission torrent client has an option to set a Blocklist, which helps protect you from getting caught and having the DMCA send a letter/email.

It's as simple as downloading and installing the latest client:

require 'dry-types'
class Carrier
attr_reader :name
def initialize(attributes)
@name = attributes.fetch(:name)
end
end
@elcritch
elcritch / gist:95e1a62e7b6974768823ce4128584ea6
Created April 19, 2016 01:42
Upload to Box via WebDav using cURL
curl -u [email protected]:mypassword -T local_file_path https://dav.box.com/dav/remote_file_name
curl -u [email protected]:mypassword https://dav.box.com/dav/remote_file_name --output download_file_path
@heri16
heri16 / user-data.txt
Created April 5, 2017 04:04
Docker-CE Cloud-init for Ubuntu 16.04 (LTS)
#cloud-config
# Upgrade the instance on first boot
# (ie run apt-get upgrade)
#
# Default: false
# Aliases: apt_upgrade
package_upgrade: true
# Install additional packages on first boot
@tylerchr
tylerchr / Dockerfile
Created July 21, 2018 01:37
Compiling V8 for alpine (link against musl)
#
# Building V8 for alpine is a real pain. We have to compile from source, because it has to be
# linked against musl, and we also have to recompile some of the build tools as the official
# build workflow tends to assume glibc by including vendored tools that link against it.
#
# The general strategy is this:
#
# 1. Build GN for alpine (this is a build dependency)
# 2. Use depot_tools to fetch the V8 source and dependencies (needs glibc)
# 3. Build V8 for alpine