Instantly share code, notes, and snippets.

git clone
cd riemann
lein deps
cat << EOF > ./riemann.config
; -*- mode: clojure; -*-
; vim: filetype=clojure
View gist:22824c421e7fff89c48834467d0cf1c1
[ 25.975058] traps: gnome-shell[3218] general protection ip:7f767ebebd12 sp:7fff707077e0 error:0 in[7f767ebb6000+52000]
[ 26.821634] ACPI BIOS Error (bug): Failure creating [\_GPE.XTBT.SPRT], AE_ALREADY_EXISTS (20180105/dswload2-350)
[ 26.821651] No Local Variables are initialized for Method [XTBT]
[ 26.821653] Initialized Arguments for Method [XTBT]: (2 arguments defined for method invocation)
[ 26.821654] Arg0: 00000000f46ed3a8 <Obj> Integer 0000000000000005
[ 26.821662] Arg1: 000000002ad9e656 <Obj> Integer 0000000002060002
[ 26.821668] ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20180105/psobject-252)
[ 26.821674] ACPI Error: Method parse/execution failed \_GPE.XTBT, AE_ALREADY_EXISTS (20180105/psparse-550)
[ 26.821683] ACPI Error: Method parse/execution failed \_GPE.XTBT, AE_ALREADY_EXISTS (20180105/psparse-550)
[ 26.821693] ACPI Error: Method parse/execution failed \_GPE._E42, AE_ALREADY_EXISTS (20180105/psparse-55
View Prometheus commands
kubectl create namespace monitoring
kubectl create -f ./prom-config-map-v1.yml -n monitoring
kubectl create -f ./prom-config-rules-map-v1.yml -n monitoring
kubectl create -f ./prom-deployment.yml -n monitoring
kubectl create -f ./prom-service.yml --namespace monitoring
View prometheus.yml
scrape_interval: 15s
evaluation_interval: 15s
# - "first.rules"
# - "second.rules"
- job_name: 'prometheus'
View serverspec.json
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-east-1",
View gist:7a48e9c36cf6e7806e9398527611528e
Things to do in Italy.
* Venice
Campo del Ghetto - Jewish ghetto.
Guggenheim Venice -
Murano - glass blowing - very touristy but super interesting to watch.
Doge's Palace.
Coffee in the Piazzo San Marco
Visit every bacari and drink spritz (Venice's tapas...)
eval $(aws ecr get-login)
docker build -t $TAG .
if[ $? -ne 0 ];then
echo "Docker build failed exiting"
View asg_notifications_lambda.js
var https = require('https');
var util = require('util');
var webhook = '/services/webhook';
var errorMessage = "ERROR";
exports.handler = function(event, context) {
console.log(JSON.stringify(event, null, 2));
console.log('From SNS:', event.Records[0].Sns.Message);
var postData = {

Given the word list:

word_list = [ "hello", "helicopter", "shaving", "door", "aluminum", "pen" ]
  1. Write a function that prints out the longest word and its length, the shortest word and its length, and the average word length

  2. Reverse the letters of each word in the array and sort from shortest to longest.

View dash.json
"annotations": {
"list": []
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"hideControls": false,
"id": 1,
"links": [],