Skip to content

Instantly share code, notes, and snippets.

View bkendzior's full-sized avatar
🪨
beats ✂️ loses to 🧻

Brian Kendzior bkendzior

🪨
beats ✂️ loses to 🧻
  • RIOS Intelligent Machines
  • Tahoe, CA
View GitHub Profile
function transform_payload(payload) {
var headers = {"content-type": "application/json",
"X-Insert-Key": "newrelic-insights-insert-api-key"};
var body = [{"eventType": payload["event"],
"timestamp": Date.parse(payload["timestamp"]),
"session_id": payload["session"]}];
return {"status": "ok", "headers": headers, "body": body};
}
@DanielMorsing
DanielMorsing / foo.go
Created January 31, 2016 18:07
the program
package main
import (
"runtime/causalprof"
"net/http"
"bufio"
"os"
"math/rand"
"fmt"
"sync/atomic"
@bkimble
bkimble / gist:1365005
Last active May 2, 2024 01:27
List local memcached keys using Ruby
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []