Skip to content

Instantly share code, notes, and snippets.

View parkeristyping's full-sized avatar

Parker Lawrence parkeristyping

View GitHub Profile

First:

brew update
brew tap elastic/tap
brew install elastic/tap/elasticsearch-full

Then to start the service:

@parkeristyping
parkeristyping / surprises.clj
Last active December 15, 2017 22:22
Surprises
;; This is a collection of code that surprised me.
;;
;; Example 1
;;
(let [counter (atom 0)
coll [(swap! counter inc)]]
[(take 1 coll) @counter])
;;=> [(1) 1]
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
@parkeristyping
parkeristyping / feature-flags.md
Created July 11, 2016 16:45
Feature flag user manual

Feature flags

To show a feature to a subset of users, use feature flags.

Feature flags can be configured from Active Admin:

Feature flags index

Just add the emails of the people you want to see a given feature to that feature flag's array of emails, like so:

Feature flags edit

@parkeristyping
parkeristyping / bundler.org
Last active May 18, 2016 14:19
Notes on Bundler for a Lunch and Learn

What is Bundler?

  • It’s the canonical package manager for Ruby
  • Works hand-in-hand with RubyGems
  • Bundler + RubyGems is kind of like:
    • Virtualenv + Pip for Python
    • NPM for NodeJS
    • Leiningen for Clojure

Quiz 1: How many lines of code in Bundler?

A)   3,921
@parkeristyping
parkeristyping / redshift_csv_uploader.py
Last active February 29, 2016 15:14
Autoload CSVs from s3 into Redshift
from __future__ import print_function
import json
import urllib
import boto3
import psycopg2
import re
s3 = boto3.client('s3')