Skip to content

Instantly share code, notes, and snippets.

@veuncent
veuncent / aws_glacier_delete_vault.md
Last active March 19, 2024 18:16
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 
@ryanj
ryanj / Kubernetes-Extensibility-with-the-Operator-pattern.html
Last active September 1, 2017 12:33
"Kubernetes Extensibility with the Operator Pattern" at OSCON's Open Container Day 2017/05/09 http://bit.ly/oscon-operators
<section>
<section data-markdown>
# Extensible Kubernetes
with the
# Operator Pattern
at
@so0k
so0k / kubectl.md
Last active April 25, 2024 12:40
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@eferro
eferro / _aws_golang_examples.md
Last active July 21, 2023 09:35
golang aws: examples

AWS Golang SDK examples

@Zearin
Zearin / python_decorator_guide.md
Last active March 30, 2024 12:28
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@crazed
crazed / bldpkg.sh
Created October 4, 2012 16:55
build mcollective pkgs on OS X
#!/bin/bash
MPATH=$1
BETCDIR='/etc/mcollective'
BRUBYDIR='/Library/Ruby/Site/1.8'
BSBINDIR='/usr/sbin'
BBINDIR='/usr/bin'
BLIBEXECDIR='/usr/libexec/mcollective'
BDOCDIR='/usr/share/doc/mcollective'
BLAUNCHDIR='/Library/LaunchDaemons'
BLOGDIR='/var/log/mcollective'
@liuwen-lvtu
liuwen-lvtu / tutorial.mkdn
Created October 18, 2011 03:19 — forked from mirisuzanne/tutorial.mkdn
A new Susy tutorial

Susy Tutorial

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

What Susy Does

CSS Systems

@robcowie
robcowie / mongo_mapreduce_by_week.js
Created May 4, 2010 15:18
mongodb map-reduce to group by week
m = function() {
var getWeek = function(d) {
/*getWeek() was developed by Nick Baicoianu at MeanFreePath: http://www.meanfreepath.com */
dowOffset = 1;
var newYear = new Date(d.getFullYear(),0,1);
var day = newYear.getDay() - dowOffset;
day = (day >= 0 ? day : day + 7);
var daynum = Math.floor((d.getTime() - newYear.getTime() - (d.getTimezoneOffset()-newYear.getTimezoneOffset())*60000)/86400000) + 1;
var weeknum;
if (day < 4) {