Instantly share code, notes, and snippets.

View nvimrc
call plug#begin('~/.vim/plugged')
Plug 'rakr/vim-two-firewatch'
Plug 'altercation/vim-colors-solarized'
Plug 'mileszs/ack.vim'
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
Plug 'scrooloose/nerdtree'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'Shougo/neocomplete'
Plug 'Shougo/neosnippet'
Plug 'Shougo/neosnippet-snippets'
View yelp-business-api.json
{
"businesses": [
{
"id": "beauty-cutie-nail-and-spa-new-york",
"name": "Beauty Cutie Nail & Spa",
"image_url": "https://s3-media3.fl.yelpcdn.com/bphoto/SL6_3y8AgXkbUxcxiCwNkg/o.jpg",
"is_closed": false,
"url": "https://www.yelp.com/biz/beauty-cutie-nail-and-spa-new-york?adjust_creative=QH0KY8ridWGXeICCt8MrQg&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_search&utm_source=QH0KY8ridWGXeICCt8MrQg",
"review_count": 8,
"categories": [
View gist:f90ea2b42060fc38c126c0b9d8c576ef
https://github.com/typelift/Swiftz
https://github.com/bricepollock/modular-architecture
https://github.com/joeldev/JLRoutes
https://github.com/thoughtbot/Argo
https://github.com/Alamofire/Alamofire
https://github.com/mxcl/PromiseKit
https://github.com/aschuch/AwesomeCache
https://github.com/danielgindi/Charts
https://github.com/ViccAlexander/Chameleon
View init.vim
filetype on
filetype indent on
filetype plugin on
syntax on
call plug#begin('~/.vim/plugged')
Plug 'mileszs/ack.vim'
" Plug 'rking/ag.vim'
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
Plug 'scrooloose/nerdtree'
View gist:5f7c17dd4ebe515cb3f49b428f92975d
http://stackoverflow.com/questions/29846864/change-the-app-name-sent-by-dockers-syslog-driver
http://dokku.viewdocs.io/dokku/docker-options/
View interpolation.exs
defmodule Interpolation do
def call(string, bindings \\ []) do
~r/(?<head>)%{[^}]+}(?<tail>)/
|> Regex.split(string, on: [:head, :tail])
|> Enum.reduce("", fn
<<"%{" <> rest>>, acc ->
key = String.to_atom(String.rstrip(rest, ?}))
acc <> to_string(Dict.fetch!(bindings, key))
segment, acc ->
acc <> segment
View gist:1de8c50a41651b268b08
Product,Description1,Description2,Price1,Price2,Qty Break,UPC,Vendor,UOM,Sub-Category,Model,Size,Color,MAP,MSRP,Category,Available,Length,Width,Height,Weight,Closeout,On Sale,Orig Price,Mfg Part No,Bullet Points,Qty SC,Qty NV,Discontinued
View determ_ruby.rb
require 'deterministic'
module Deterministic
module Monad
alias :>= :fmap
end
end
class Foo
include Deterministic
View faye_nginx.conf
upstream faye {
server 127.0.0.1:9292;
}
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://faye;