Skip to content

Instantly share code, notes, and snippets.

@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 / 2014-09-30-sample.rb
Created March 9, 2017 04:12
my little mailer
message.to = 'Person Name <person@example.com>'
message.subject = 'Sample Subject'
# body is probably good enough, but you can set text_part/html_part below if you like
message.body = <<HERE.strip
Hey-
This is a sample
Thanks
HERE
@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:

@bf4
bf4 / dl.sh
Created May 2, 2016 06:49
RailsConf 2016 JSON schedule
#/usr/bin/env bash
json_url() {
local base="https://m.guidebook.com/api/v1/public_event/?guide__id=64858&limit=0&start_time__year=2016&start_time__month=5"
local day="$1"
local url="${base}&start_time__day=${day}"
echo -e "$url"
$url
}
for day in 4 5 6; do
curl -XGET $(eval "json_url $day") -o "may_${day}.json"
@bf4
bf4 / child_index.html.haml
Created December 24, 2012 17:30
Rails template / layout inheritance
-content_for :title do
Child Title
The rest of the page goes here