Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block aodin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View IsRemoteRegex
package repo
import (
type Repo struct {
// The path of the Repoisotry. This could be
View IsRemote Benchmark
package repo
import (
func BenchmarkIsRemote(b *testing.B) {
repos := []Repo{
{Path: "git://"},
{Path: "git://"},
aodin / gist:9493340
Created Mar 11, 2014
Insert to PostGres
View gist:9493340
package main
import (
_ ""
func connect(driver string, credentials string) *sql.DB {
View gist:9824698
package main
import (
// Global wait group
var jobs sync.WaitGroup
# Description:
# Get the top news item from HN
# Commands:
# hubot hn - Return the top item on HN
module.exports = (robot) ->
robot.respond /hn( me)?$/i, (msg) ->
story = hnTopStory(msg)
console.log story
aodin / gamma.jl
Created Apr 26, 2016
Plotting the Gamma distribution sampling from it as a normalized histogram
View gamma.jl
# Plotting the Gamma distribution and sample as a normalize histogram
using Distributions
using Gadfly
pdf(d::Gamma, x) = (x ^ (d.α - 1) * e ^ (-x / d.α)) / (d.θ ^ d.α * gamma(d.α))
n = 500
g = Gamma(2., 2.)
aodin /
Created Jul 14, 2016 — forked from arikfr/
re:dash fabfile
#!/usr/bin/env python
# vim: ts=4:sw=4:expandtab:autoindent:
import os
import sys
import requests
import filecmp
from fabric.context_managers import hide, settings, prefix
from fabric.api import sudo, task, run, cd, env
from fabric.contrib.console import confirm
from fabric.colors import green
aodin / sql_results.go
Created Dec 16, 2016
Go's SQL Results Must Be Closed
View sql_results.go
package main
import "database/sql"
import "log"
import _ ""
func main() {
conn, err := sql.Open("postgres", "user=aaronoellis dbname=bar sslmode=disable")
if err != nil {
aodin / sql_benchmark.go
Created Dec 16, 2016
SQL Benchmark Test for Go
View sql_benchmark.go
package main
import (
aodin / onion.sql
Created Dec 16, 2016
Onion SQL Schema
View onion.sql
CREATE TABLE things_versioned (
id integer not null,
name varchar not null,
version timestamp with time zone default now(),
PRIMARY KEY (id, version)
You can’t perform that action at this time.