Skip to content

Instantly share code, notes, and snippets.

View underscorenygren's full-sized avatar

Erik Nygren underscorenygren

View GitHub Profile
@underscorenygren
underscorenygren / _service.md
Last active August 29, 2015 14:18 — forked from naholyr/_service.md
Setting up an init.d service using chef.

Sample service script for debianoids

Look at LSB init scripts for more information.

Modified to work with Chef

Usage

template "/etc/init.d/[NAME]" do
@underscorenygren
underscorenygren / sprint_points.js
Created November 16, 2012 22:41
Calculates the points in the current Asana sprint. Sums each row that has a [XX] point value and displays in console. Works best as bookmarklet.
(function () {
var reg = /\[(\d+)\]/,
elems = document.getElementsByClassName('task-row-text-input'),
total = 0, elem,
i, il;
for (i = 0; i < il; i++) {
elem = elems[i];
val = elem.value;
mat = reg.match(val);
if (mat) {
@underscorenygren
underscorenygren / gist:4155210
Created November 27, 2012 16:21
Calculate the points in an Asana Sprint (the number of rows starting with [XX])
(function () {
var reg = /\[(\d+)\]/,
elems = document.getElementsByClassName('task-row-text-input'),
total = 0, elem,
i, il;
@underscorenygren
underscorenygren / parsec_duration_scripted_field.java
Created June 8, 2017 19:35
Kibana Scripted Field, Connections ms to Seconds
double val = doc['connection_duration'].value;
return val / (60.0 * 60.0);
@underscorenygren
underscorenygren / logstash.conf
Created June 8, 2017 20:56
Debug logstash config with ES, S3 and some handy filters
input {
http {
port => 8080
}
}
filter {
if [headers][request_path] == "/liveness" {
drop {}
@underscorenygren
underscorenygren / xrayforlambda.go
Last active June 13, 2019 23:59
XrayForLambda.go
package tracing
import (
"context"
"encoding/json"
"fmt"
"os"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-sdk-go/aws/session"

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@underscorenygren
underscorenygren / Readme.md
Last active December 11, 2019 17:07
Metropolitan Opera Rush Ticket Sniper

###What it is

The Met Sniper script is a simple way to get access to rush tickets from the Metropolitan Opera. It is a script you install, which will run on the rush tickets page, constantly reloading until it sees that tickets are available, and navigate you to the page where you can claim them.

This should give you enough time to complete the purchase flow.

###How it works