Skip to content

Instantly share code, notes, and snippets.

View yobennett's full-sized avatar

Bennett yobennett

  • Netflix
  • San Francisco
View GitHub Profile
@asukakenji
asukakenji / 0-go-os-arch.md
Last active June 28, 2024 15:10
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
from botocore.credentials import RefreshableCredentials
from botocore.session import get_session
from boto3 import Session
def assumed_session(role_arn, session_name, session=None):
"""STS Role assume a boto3.Session
With automatic credential renewal.
@harlow
harlow / golang_job_queue.md
Last active April 24, 2024 10:21
Job queues in Golang
@trusche
trusche / statsd.md
Last active May 2, 2019 13:05
Installing graphite and statsd on OS X Yosemite

Prerequisites

  • Homebrew
  • Python 2.7
  • Git

Graphite

Install Cairo

There's an issue with cairo 14.x that results in the axis fonts on the graphs being HUUUUUGE. Downgrading to 12.6 helps:

@klang
klang / dynamodb.org
Created April 10, 2015 09:04
Example usage of DynamoDB from the cli (inside emacs, via org-mode)

Set up the environment

(setq org-confirm-babel-evaluate nil)
(setq org-babel-sh-command "ssh default ")
;; customize the following variables:
;;(setq org-babel-load-languages 
;;<<< '((emacs-lisp . t) (python . t) (clojure . t) (sh . t ) (perl . t)))
@kevints
kevints / SecureSchedulerMain.java
Created September 2, 2014 21:19
MVP of twitter.common.application+guice+jetty+shiro+jersey
package org.apache.aurora.scheduler.app;
import java.util.Arrays;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
@cxxr
cxxr / SearchES.java
Last active August 29, 2015 14:04
How to search Elasticsearch, with a good code contract
package me.seancassidy.search;
import com.google.gson.FieldNamingPolicy;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.ElasticsearchTimeoutException;
import org.elasticsearch.action.ListenableActionFuture;
import org.elasticsearch.action.search.SearchPhaseExecutionException;
package main
import (
"fmt"
"log"
"net/http"
"html/template"
"github.com/gorilla/sessions"
@staltz
staltz / introrx.md
Last active June 29, 2024 15:58
The introduction to Reactive Programming you've been missing