Skip to content

Instantly share code, notes, and snippets.

View bkono's full-sized avatar

Bryan Konowitz bkono

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bkono on github.
  • I am bkono (https://keybase.io/bkono) on keybase.
  • I have a public key ASASckZ-1gUvHCVp-CBHrt-Ze8KDRkVgGp2wQmrYPF4Zlwo

To claim this, I am signing this object:

@bkono
bkono / cloak.ovpn
Created January 17, 2017 19:23 — forked from d3v-null/cloak.ovpn
This is an OpenVPN settings file for Cloak. Forked for compatibility the OpenVPN client in ASUS RT routers
client
dev tun
comp-lzo
auth-user-pass
# remote-cert-tls server
server-poll-timeout 10
auth-nocache
auth-retry interact
verb 1
remote openvpn.getcloakvpn.com 443 udp
@bkono
bkono / Dockerfile
Created September 6, 2016 16:21 — forked from bitwalker/Dockerfile
Release container image
FROM bitwalker/alpine-erlang:latest
MAINTAINER Paul Schoenfelder <[email protected]>
ENV REFRESHED_AT=2016-06-21 \
HOME=/opt/app/ \
MIX_ENV=prod \
TERM=xterm \
APP=myapp \
APPVER=0.1.0
@bkono
bkono / config.ex
Created September 2, 2016 00:29 — forked from bitwalker/config.ex
Useful config wrapper for Elixir
defmodule Config do
@moduledoc """
This module handles fetching values from the config with some additional niceties
"""
@doc """
Fetches a value from the config, or from the environment if {:system, "VAR"}
is provided.
An optional default value can be provided if desired.
@bkono
bkono / ROP.ex
Created June 3, 2016 00:05 — forked from zabirauf/ROP.ex
Railway Oriented Programming macros in Elixir
defmodule ROP do
defmacro try_catch(args, func) do
quote do
(fn ->
try do
unquote(args) |> unquote(func)
rescue
e -> {:error, e}
end

Comparative Benchmark Numbers @ Rackspace

I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.

Results

Framework Throughput (req/s) Latency (ms) Consistency (σ ms)
@bkono
bkono / battinfo.rb
Last active August 29, 2015 14:22 — forked from PogiNate/battinfo.rb
#!/usr/bin/env ruby
# encoding: utf-8
full = "★"
empty = "☆"
battery = "🔋"
plug = "⚡"
star_count = 5
per_star = 100/star_count
alias gst='git status'
compdef _git gst=git-status
alias gd='git diff'
compdef _git gd=git-diff
alias gl='git pull'
compdef _git gl=git-pull
alias gp='git push'
compdef _git gp=git-push
alias gc='git commit -v'
compdef _git gc=git-commit
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
@bkono
bkono / person.rb
Created July 2, 2012 07:10
Sample ActiveModel based class supporting from_json
class Person
include ActiveModel::Serialization
include ActiveModel::Serializers::JSON
attr_accessor :name, :email
def initialize(attributes = {})
attributes.each do |name, value|
send("#{name}=", value)
end