Skip to content

Instantly share code, notes, and snippets.

View julienba's full-sized avatar

julien bille julienba

View GitHub Profile
@julienba
julienba / hammock.md
Created July 26, 2020 10:35 — forked from mowat27/hammock.md
Outline of Hammock Driven Development

Hammock Driven Development

Taken from Rich Hickey's day 2 keynote at Clojure Conj 2010.

Hammock Driven Development Presentation

Notes

{"spec": "(spec-tools.core/spec {:spec (clojure.spec.alpha/keys :req-un [:app.route.api/x :app.route.api/y]), :type :map, :leaf? false})",
"problems":[{"path":["y"],"pred":"clojure.core/int?","val":"a","via":["app.route.api/plus-request","app.route.api/y"],"in":["y"]}],
"type":"reitit.coercion/request-coercion",
"coercion":"spec",
"value":{"x":"2","y":"a"},
"in":["request","query-params"]}
@julienba
julienba / keymap.cson
Last active September 8, 2020 13:45
atom
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
;; For inspecting datastructure:
;; https://clojure.github.io/clojure/clojure.inspector-api.html#clojure.inspector/inspect-tree
(defn repl-settings!
[]
;; Watch out -- this affects `pr-str`
(do (alter-var-root #'*print-length* (constantly 20))
(alter-var-root #'*print-level* (constantly 6))))
;; A library that can be used to render typical Clojure data structures using Graphviz.

FWIW: I didn't produce the content present here. I've just copy-pasted it from somewhere over the Internet, but I cannot remember exactly the original source. I was also not able to find the author's name, so I cannot give him/her the proper credit.


Effective Engineer - Notes

What's an Effective Engineer?

CREATE EXTERNAL TABLE IF NOT EXISTS checkins (
id int
user_id int,
venue_id int,
date timestamp
)
ROW FORMAT SERDE
'org.openx.data.jsonserde.JsonSerDe'
LOCATION
's3://YOUR_BUCKET/checkins'
@julienba
julienba / cloudformation.json
Created December 16, 2016 10:45 — forked from nickpad/cloudformation.json
Example cloudformation template for auto scaling deploys
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Auto scaling deploy example",
"Parameters": {
"AvailabilityZone": {
"Type": "String",
"Default": "us-west-1a"
},
"ImageId": {
"Type": "String"
@julienba
julienba / Dockerfile
Created December 13, 2016 10:48 — forked from ryandotsmith/Dockerfile
EC2 Docker Setup
FROM ubuntu
MAINTAINER "Bobby Wilson"
RUN apt-get update
RUN apt-get install curl -y
RUN cd /usr/local; curl -O http://nodejs.org/dist/v0.10.16/node-v0.10.16-linux-x64.tar.gz
RUN cd /usr/local; tar xzf node-v0.10.16-linux-x64.tar.gz
ENV PATH /usr/local/bin:/usr/sbin:/bin:/usr/local/node-v0.10.16-linux-x64/bin
ADD . /app
EXPOSE 8000:8000
ENV PORT 8000
$ go install code.google.com/p/go.tools/cmd/vet
go install code.google.com/p/go.tools/cmd/vet: open /usr/local/go/pkg/tool/linux_amd64/vet: permission denied
$ sudo su - root
# GOPATH=/tmp/go /usr/local/go/bin/go get code.google.com/p/go.tools/cmd/cover
# GOPATH=/tmp/go /usr/local/go/bin/go get code.google.com/p/go.tools/cmd/vet
# rm -r /tmp/go
# exit
# define some variables
variable "aws_ubuntu_ami" {
default = "ami-972444ad"
}
variable "aws_keypair" {
default = "xxxx"
}
# AWS account details