Skip to content

Instantly share code, notes, and snippets.

View johnclaus's full-sized avatar

John Claus johnclaus

  • The Front Range
View GitHub Profile
@johnclaus
johnclaus / github-pages-custom-domain-gandi-dns-records.md
Created February 6, 2024 17:04 — forked from matt-bailey/github-pages-custom-domain-gandi-dns-records.md
How to set up DNS records on gandi.net to use a custom domain on Github Pages

How to set up DNS records on gandi.net to use a custom domain on Github Pages

You would think it would be easy to find this information, but none of the Github or Gandi documentation is clear so I have recorded the required steps here.

Create the following A records:

@ 1800 IN A 185.199.108.153
@ 1800 IN A 185.199.109.153
@ 1800 IN A 185.199.110.153
@johnclaus
johnclaus / aws_glacier_delete_vault.md
Created April 13, 2021 18:07 — forked from veuncent/aws_glacier_delete_vault.md
Delete all archives in an AWS Vault

AWS Glacier: Delete vault

Follow these steps to remove all archives from an AWS vault. After this is finished, you will be able to delete the vault itself through the browser console.

Step 1 / Retrieve inventory

This will create a job that collects required information about the vault.

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --account-id YOUR_ACCOUNT_ID --region YOUR_REGION --vault-name YOUR_VAULT_NAME 
@johnclaus
johnclaus / NetflixBookmarks.html
Created February 1, 2016 10:02 — forked from thauber/NetflixBookmarks.html
Chrome: Download this file. Then in chrome select Hamburger Menu > Bookmarks > Bookmark Manager. Click on the Chevron next to "Organize" then select "Import Bookmarks from HTML File...". Select the the downloaded version of this gist. It will create a folder called "Imported". Rename it to "Netflix" and move it where ever you would like.
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><A ADD_DATE="1452301889" HREF="http://netflix.com/browse/genre/1365">Action & Adventure</A>
<DT><A ADD_DATE="1452301889" HREF="http://netflix.com/browse/genre/43040">Action Comedies</A>
#!/bin/sh
VERSION="7u67"
BUILD="betable1"
set -e -x
# Keep track of the original working directory.
OLDESTPWD="$PWD"
@johnclaus
johnclaus / graphite-deb.sh
Created December 10, 2015 21:07 — forked from rcrowley/graphite-deb.sh
Graphite Debian packaging
VERSION="0.9.9"
BUILD="betable1"
set -e -x
# Keep track of the original working directory.
OLDESTPWD="$PWD"
# Work in a temporary directory.
cd "$(mktemp -d)"
@johnclaus
johnclaus / sorts.md
Last active August 29, 2015 14:21 — forked from twotwotwo/sorts.md

github.com/twotwotwo/sorts is a Go package with parallel radix- and quicksorts. It can run up to 5x faster than stdlib sort on the right sort of large sort task, so it could be useful for analysis and indexing/database-y work in which you have to sort millions of items. (To be clear, I don't recommend most folks drop stdlib sort, which is great, and which sorts depends on.)

While the process of writing it's fresh on my mind, here are some technical details, some things that didn't make the cut, and some thoughts about the process:

Concretely, what this looks like inside:

  • Both number and string versions are in-place MSD radix sorts that look at a byte at a time and, once the range being sorted gets down to 128 items, call (essentially) the stdlib's quicksort.

  • The [parallelization code

Writing Bug-Free Chef Recipes

Chef has unique abstraction and processing models. Until you understand them, it is easy to write buggy recipes.

The most important thing to understand is the following: a Chef recipe is not a collection of scripts.

Chef Processing Model

I like Learn You a Haskell as a reference and cheat-sheet but I found it a little slow for learning Haskell.

Here's my recommended order for just learning Haskell:

http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way/ 80% completion here is fine if you feel your attention waning, the next thing will address hammering in things like functors and monads via typeclasses.

https://github.com/NICTA/course/ this will hammer in the lessons in a very direct form by forcing you to confront the challenges and lessons learned by the creators and community of Haskell itself. Doing the exercises here is critical for being fluent.

Real World Haskell is available online. (Thanks bos!)

* How do I release this?
* I must be able to perform a 'rolling' release of this in a live system w/o
causing a service interruption
* does it break backward compatability with existing users of the api/system/etc
* do we need to cut a new XSD? A new version (URI prefix) of our API?
* did we make updates to checkouts/SNAPSHOT deps? Do we need to cut new versions of project deps?
* how do I support existing users?
* in what order do the affected systems need to be released?
* are there system or service configuration changes that are required?
* What are the Security implications of my change?