Skip to content

Instantly share code, notes, and snippets.

Avatar

Erik Nygren underscorenygren

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

View 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"
@underscorenygren
underscorenygren / logstash.conf
Created Jun 8, 2017
Debug logstash config with ES, S3 and some handy filters
View logstash.conf
input {
http {
port => 8080
}
}
filter {
if [headers][request_path] == "/liveness" {
drop {}
@underscorenygren
underscorenygren / parsec_duration_scripted_field.java
Created Jun 8, 2017
Kibana Scripted Field, Connections ms to Seconds
View parsec_duration_scripted_field.java
double val = doc['connection_duration'].value;
return val / (60.0 * 60.0);
@underscorenygren
underscorenygren / Readme.md
Last active Dec 11, 2019
Metropolitan Opera Rush Ticket Sniper
View Readme.md

###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

@underscorenygren
underscorenygren / _service.md
Last active Aug 29, 2015 — forked from naholyr/_service.md
Setting up an init.d service using chef.
View _service.md

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 / gist:4155210
Created Nov 27, 2012
Calculate the points in an Asana Sprint (the number of rows starting with [XX])
View gist:4155210
(function () {
var reg = /\[(\d+)\]/,
elems = document.getElementsByClassName('task-row-text-input'),
total = 0, elem,
i, il;
@underscorenygren
underscorenygren / sprint_points.js
Created Nov 16, 2012
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.
View sprint_points.js
(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) {