Skip to content

Instantly share code, notes, and snippets.

View jessejlt's full-sized avatar

Jesse Thompson jessejlt

View GitHub Profile
@jessejlt
jessejlt / experiment-pipeline.yaml
Last active May 1, 2019 17:11
concourse experimentation example
jobs:
- name: some experiment
plan:
- task: experiment
config:
platform: linux
run:
path: /bin/bash
args: -exc
- |
package main
import (
"io"
"log"
)
func main() {
w := sink()
@jessejlt
jessejlt / main.go
Created October 8, 2017 16:50
AWS SDK S3 mocking
package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/s3iface"
)
package main
import (
"encoding"
"encoding/json"
"fmt"
)
func main() {
@jessejlt
jessejlt / perf.md
Last active August 29, 2015 14:05
Sharedcloud collection performance

Is taking ~500ms to GET /collections/:id a bug or expected? What about taking ~1s to create a collection?

curl -w %{time_total} -iX POST https://cc-us1-stage.adobesc.com/api/v1/collections \
-H "X-User-Token: ---" \
-H "Authorization: ---" \
-H "Content-Type:application/json" \
--data-binary '{
  "collection_name": "1s3c5",
  "parent_collection": "77e10fd2-eb88-4845-8610-d3cae9f8efc4"
@jessejlt
jessejlt / about.md
Created July 2, 2013 06:11
Some ECMAScript 6 features I'm excited about
@jessejlt
jessejlt / master.yml
Created May 14, 2012 19:02
ElasticSearch zen unicast discovery
cluster.name: elasticsearch_media
node.name: "media-dev"
node.master: true
node.data: true
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["153.32.228.250[9300-9400]", "10.122.234.19[9300-9400]"]
@jessejlt
jessejlt / command line example
Created April 6, 2012 19:37
nosetests running a single test programmatically
$ nosetests flask.testsuite.testing:TestToolsTestCase.test_environ_defaults
.
----------------------------------------------------------------------
Ran 1 test in 0.014s
OK
@jessejlt
jessejlt / nginx.conf
Created March 23, 2012 17:20
Flask + nginx + uwsgi
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:4050;
}
curl -XDELETE localhost:9200
curl -XPOST localhost:9200/test/tools -d '
{
"type": "crayon",
"color": "red"
}'
curl -XPOST localhost:9200/test/tools -d '
{