Skip to content

Instantly share code, notes, and snippets.

What

A technique for writing parsers.

Why

  • Easy to understand
  • Generally applicable
  • Full power of the programming language at your disposal
  • Declarative
@bf4
bf4 / ams.rb
Created April 3, 2017 02:17 — forked from sineed/ams.rb
Upgrade AMS from 0.9.0 to 0.10.0
module AMS
module V09
class Serializer < ActiveModel::Serializer
def serializable_hash(adapter_options = nil,
options = {},
adapter_instance = self.class.serialization_adapter_instance)
object.nil? ? nil : super
end
end
@bf4
bf4 / learn_clojure_recipe.md
Created March 14, 2017 20:40 — forked from pricees/learn_clojure_recipe.md
Recipe to Learn Clojure
@bf4
bf4 / go_kinesis_with_structs.go
Created March 14, 2017 20:39 — forked from pricees/go_kinesis_with_structs.go
Go + AWS Kinesis + Encode/Decode Structs
/**
NOTE:
Assumes env contains aws credentials:
AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY
AWS_SECRET_KEY_ID or AWS_SECRET_KEY
and AWS_REGION_NAME (e.g. 'US-EAST-1')
see EnvAuth() below
*/
@bf4
bf4 / dontforget.bash
Created February 20, 2017 02:19 — forked from ttscoff/dontforget.bash
Quick reminders from Terminal (bash)
#!/bin/bash
# dontforget
#
# A stupid script for short term reminders in bash
#
# Arguments just need to contain a number and a bunch of words.
#
# The number can be anywhere in the arguments, but there shouldn't
# be any other numeric digits.
#
@bf4
bf4 / _dev_badge.html.slim
Created February 1, 2017 16:48 — forked from stevenharman/_dev_badge.html.slim
A simple badge that shows your Rails environment.
/ In app/views/shared/
#dev-badge
span= Rails.env
span It ain't production!
require 'warden/github'
class SidekiqGithubChecker
def self.registered(app)
app.helpers do
def warden; env['warden'] end
def github_organization_authenticate!(name)
unless warden.user.organization_member?(name)
halt [401, {}, ["You don't have access to organization #{name}"]]
end
@bf4
bf4 / file.md
Created January 16, 2017 17:07 — forked from jjb/file.md
Trying to figure out performance impact of RUBY_GC_HEAP_GROWTH_FACTOR
@bf4
bf4 / README.md
Created January 6, 2017 04:28 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


Index: