Skip to content

Instantly share code, notes, and snippets.

@ober
ober / *HTTP Twiddle*
Created November 17, 2014 19:29
here
POST /api/v1/payment/cc/validate HTTP/1.1
Host: api-q1.shopcurbside.com:443
Accept: application/json
Content-Type: application/json
Authorization: Basic cHJvbW9vd25lcm5oMjM0QHNob3BjdXJic2lkZS5jb206cGFzc3dvcmQ=
Cache-Control: no-cache
Content-Length: 1055
{"first_name":"Edie","address":{"zipcode":"94036","state":"CA","line_1":"455 Portage Ave","line_2":"","city":"Palo Alto","country":"US"},"last_4":"0604","expiration_date":"1/20","cvv":"$bt3|android_2_0_0$Ec9iLkOu0TmRf3gKLw9clTLLiVE0QrF3kiIXazLWxMXI3046SHbXGW62GM0PmB5TxsRaZp2tjpaE4YPzHskeFzKStPwPskWW7NkJMXmT19kEwnCi1GsqaeBoj999+UUdFQyNsuTmk6UCmeAAb4iz6BMQ8A/94iGDAcWpLZoRqHu5+e5T6McieRC2spv7vh0q9SDsVwly9ZOhvHH0B1xr+zxbqFmT/CDpNE1XNPZlsAvBc5utv4oEYaztDykZxfnSIsRDwOKapFavbooewC6OjTI9cSN2utFHKQe7qYRHJVxDVSb1H29cKcfvrgunlNGze2oZFYCFC/m9KIxvoWC4uQ==$0Mq2bDXEwktwl9R4t2TfaGPWLzJpHxM9SXSMRgr0M4w=","last_name":"Britt","number":"$bt3|android_2_0_0$xXEp1hiV2qfIdFbFGIscKlTvVuJYTj+jfLKVx21eq70YMJB3TkB4BpruZKfp0gaRQc99p7U+1ZR45osvl3OyVaYSkOapWIft/ccKg0UBgg+wHdoKcDWPhhAqyvBT
@ober
ober / *Racket REPL*
Created November 14, 2014 00:05
racket-mode error
/Users/jaimef/.emacs.d/elpa/racket-mode-20141112.1440/cmds.rkt:3:9: collection not found
for module path: macro-debugger/analysis/check-requires
collection: "macro-debugger/analysis"
in collection directories:
/Users/jaimef/Library/Racket/6.1/collects
/usr/local/Cellar/plt-racket/6.1/share/racket/collects
... [6 additional linked and package directories]
context...:
show-collection-err
standard-module-name-resolver
@ober
ober / stacks.py
Created November 11, 2014 01:33
New to python
#!/usr/bin/env python
#
# Stack management through "qa" "staging" "production"
#
from sys import *
from os import *
from os.path import *
;; Use this for remote so I can specify command line arguments
(defun remote-term (new-buffer-name cmd &rest switches)
(setq term-ansi-buffer-name (concat "*" new-buffer-name "*"))
(setq term-ansi-buffer-name (generate-new-buffer-name term-ansi-buffer-name))
(setq term-ansi-buffer-name (apply 'make-term term-ansi-buffer-name cmd nil switches))
(set-buffer term-ansi-buffer-name)
(term-mode)
(term-char-mode)
(term-set-escape-char ?\C-x)
(switch-to-buffer term-ansi-buffer-name))

(defun sacha/animate-emacs-chat () (interactive) (text-scale-set 6) (erase-buffer) (sit-for 3) (let ((list ‘(“Emacs Chat: Sacha Chua” “interviewed by Bastien Guerry” “” “July 24, 2013” “sachachua.com/emacs-chat”))

@ober
ober / anonymous-gist.el
Created October 30, 2014 18:23
term paste
(defun my-term-paste (&optional string)
(interactive)
(process-send-string
(get-buffer-process (current-buffer))
(if string string (current-kill 0)))
)
@ober
ober / provision.yml
Created October 28, 2014 19:59
Playbook
# Use the ec2 module to create a new host and then add
# it to a special "ec2hosts" group.
- hosts: localhost
connection: local
gather_facts: False
tasks:
- name: Create Instance
ec2: image={{ item.value.image }}
instance_type={{ item.value.instance_type }}
@ober
ober / provision.yml
Created October 28, 2014 01:55
here
# Use the ec2 module to create a new host and then add
# it to a special "ec2hosts" group.
- hosts: localhost
connection: local
gather_facts: False
tasks:
- name: Create Instance
ec2: image={{ item.value.image }}
instance_type={{ item.value.instance_type }}
@ober
ober / provision.yml
Created October 28, 2014 00:40
here
# Use the ec2 module to create a new host and then add
# it to a special "ec2hosts" group.
- hosts: localhost
connection: local
gather_facts: False
tasks:
- name: Create Instance
ec2: image={{ item.value.image }}
instance_type={{ item.value.instance_type }}
---
- name: Provision ec2
hosts: 127.0.0.1
connection: local
tasks:
- name: Create security group
local_action:
module: ec2_group
name: default-ssh-test
description: Access default ssh