Skip to content

Instantly share code, notes, and snippets.

View obscurerichard's full-sized avatar
🎩
🧐💾🚴‍♂️🌱

Richard Bullington-McGuire obscurerichard

🎩
🧐💾🚴‍♂️🌱
View GitHub Profile
@danielpataki
danielpataki / Vagrantfile
Last active February 23, 2019 21:40
WordPress On Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "192.168.99.99"
@obscurerichard
obscurerichard / dedupe-cacerts.sh
Last active August 29, 2015 14:06
CA Certificate Bundle De-Duplication script
#!/bin/bash
# dedupe-cacerts.sh
#
# De-duplicates a certificate authority bundle, such as cacerts.pem
# or ca-bundle.crt. This will emit CA certificates in the order they
# appeared, annotating them with full info on each certificate,
# omitting any duplicate certificates.
#
# Usage:
#
@itamarhaber
itamarhaber / scan_del.sh
Created April 20, 2014 22:27
A bash script that deletes Redis keys by pattern using SCAN
#!/bin/bash
if [ $# -ne 3 ]
then
echo "Delete keys from Redis matching a pattern using SCAN & DEL"
echo "Usage: $0 <host> <port> <pattern>"
exit 1
fi
cursor=-1
@jshiell
jshiell / icinga-on-centos.sh
Last active February 27, 2016 16:10
Icinga on CentOS 6.4 via RPM
# These are very quick & dirty notes on getting Icinga installed on Centos 6.5 via RPMs,
# as most documentation seems to be based around source installation. It's mostly recovered from
# my history as I worked it out, so no guarantees are offered.
# Make EPEL available
sudo rpm -Uvh http://mirror.bytemark.co.uk/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
# Install HTTPd
sudo yum install httpd
sudo service https start
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@jboner
jboner / latency.txt
Last active November 15, 2024 14:00
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@lukebayes
lukebayes / ERBResolver
Created October 21, 2009 16:55
A Rake Task that makes it stupid-easy to render ERB templates to disk
##################################
# MIT LICENSE
# Copyright (C) 2012 Luke Bayes
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
##################################
# MIT LICENSE
# Copyright (C) 2012 Luke Bayes
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: