Skip to content

Instantly share code, notes, and snippets.

View aerickson's full-sized avatar

Andrew Erickson aerickson

View GitHub Profile
@aerickson
aerickson / build_with_proxy.sh
Last active March 2, 2022 19:36
docker_build_package_caching
#!/usr/bin/env bash
#
# script to build docker images and use a polipo proxy if present
# - works well for caching package fetches during apt install, etc
#
set -e
# set -x
@aerickson
aerickson / mirror.sh
Created May 7, 2020 07:00
mirror squarespace site with wget
#!/usr/bin/env bash
set -e
wget --recursive -c --level=inf --page-requisites --convert-links --adjust-extension --span-hosts --domains=mywebsite.com,squarespace-cdn.com http://www.mywebsite.com
@aerickson
aerickson / # llvm - 2020-04-02_11-35-20.txt
Created April 2, 2020 20:44
llvm on macOS 10.15.3 - Homebrew build logs
Homebrew build logs for llvm on macOS 10.15.3
Build date: 2020-04-02 11:35:20
@aerickson
aerickson / README.md
Created August 28, 2019 19:50 — forked from robbiet480/README.md
A consul-template plugin to get EC2 metadata

ec2-consul-template-plugin

About

This is a simple little Python script to let you query EC2 metadata from consul-template. It's only requirement is boto. It uses the EC2 internal metadata service so it does not require any API keys or even a region. The only caveat is that this can only be run on a machine on EC2.

Usage

You can give no arguments for full dictionary output or one or more arguments to get specific key(s). Put it somewhere on your machine, chmod +x it and give the full path to consul-template.

Examples

@aerickson
aerickson / README.md
Created August 28, 2019 19:50 — forked from marceloalmeida/README.md
A consul-template plugin to get EC2 metadata

ec2-consul-template-plugin

About

This is a simple little Python script to let you query EC2 metadata from consul-template. It's only requirement is boto. It uses the EC2 internal metadata service so it does not require any API keys or even a region. The only caveat is that this can only be run on a machine on EC2.

Usage

You can give no arguments for full dictionary output or one or more arguments to get specific key(s). Put it somewhere on your machine, chmod +x it and give the full path to consul-template.

Examples

@aerickson
aerickson / Screen Cheat Sheet.txt
Created October 7, 2016 23:41
gnu-screen tips
Screen Cheat Sheet
===========================
terminal usage:
new session:
screen
new named session:
screen -S <NAME>
view sessions:
screen -list
@aerickson
aerickson / gist:4b40a16b824e5891d237
Last active October 2, 2015 21:26
Bootstrap 3.0.0 and Typeahead.js 0.11.1/Latest working example. From http://jsfiddle.net/KrtB5/340/.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo</title>
<script type='text/javascript' src='//code.jquery.com/jquery-2.0.2.js'></script>
@aerickson
aerickson / bootstrap_3_with_typeahead_js_working.html
Last active October 2, 2015 20:56
Example showing Bootstrap 3.0.0 and Typeahead.js 0.9.3 working. From http://www.bootply.com/86571# (but with fixed css/js links).
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Bootply snippet - Bootstrap 3 Typeahead</title>
<meta name="generator" content="Bootply" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="A search typeahead example for Bootstrap 3" />
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
@aerickson
aerickson / keybase.md
Created April 4, 2015 03:55
keybase.md

Keybase proof

I hereby claim:

  • I am aerickson on github.
  • I am aerickson (https://keybase.io/aerickson) on keybase.
  • I have a public key whose fingerprint is 6DE6 51F5 A324 882E AB32 A9E8 DE79 F47A 9C1F 0CA6

To claim this, I am signing this object:

@aerickson
aerickson / PyCurlSSLFixOnUbuntu
Last active December 16, 2018 11:34
how to rebuild PyCurl against OpenSSL on Ubuntu (12-13+)
XBMC uses pycurl/libcurl to fetch stuff. YouTube requires the RC4
cipher that GnuTLS has removed for security reasons (or doesn't allow
it to be selected, or XBMC doesn't allow to specify the cipher...).
PyCurl linked against OpenSSL can take the RC4 argument and make the
Youtube plugin work (Ubuntu ships it linked against GnuTLS), so we
need to rebuild to make it work.
///
from: https://code.google.com/p/wfuzz/wiki/PyCurlSSLBug