Skip to content

Instantly share code, notes, and snippets.

View bkono's full-sized avatar

Bryan Konowitz bkono

View GitHub Profile
# mongo_template.rb
# remove unneeded defaults
run "rm public/index.html"
run "rm public/images/rails.png"
run "rm public/javascripts/controls.js"
run "rm public/javascripts/dragdrop.js"
run "rm public/javascripts/effects.js"
run "rm public/javascripts/prototype.js"
@bkono
bkono / ubuntu_redis_install.sh
Created May 7, 2012 05:54
Ubuntu Redis Install
#!/bin/bash
mkdir /opt/redis
#RedisVersion=2.2.14
RedisVersion=2.4.8
wget http://redis.googlecode.com/files/redis-$RedisVersion.tar.gz
tar -zxvf redis-$RedisVersion.tar.gz
cd redis-$RedisVersion
@bkono
bkono / 1.js
Created June 19, 2012 05:54 — forked from mxriverlynn/1.js
ajax command wrapper
var signForm = $.ajax({
type: "POST",
url: "/some/form",
dataType: "JSON",
data: myData
});
signForm.done(function(response){
// handle success here
});
#!/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 / 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

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 / 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
@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 / Dockerfile
Created September 6, 2016 16:21 — forked from bitwalker/Dockerfile
Release container image
FROM bitwalker/alpine-erlang:latest
MAINTAINER Paul Schoenfelder <paulschoenfelder@gmail.com>
ENV REFRESHED_AT=2016-06-21 \
HOME=/opt/app/ \
MIX_ENV=prod \
TERM=xterm \
APP=myapp \
APPVER=0.1.0
@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