Skip to content

Instantly share code, notes, and snippets.

Owain Lewis owainlewis

Block or report user

Report or block owainlewis

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
subfuzion /
Last active Sep 30, 2019
Concise guide to golang/dep


This gist is based on the information available at golang/dep, only slightly more terse and annotated with a few notes and links primarily for my own personal benefit. It's public in case this information is helpful to anyone else as well.

I initially advocated Glide for my team and then, more recently, vndr. I've also taken the approach of exerting direct control over what goes into vendor/ in my Dockerfiles, and also work from isolated GOPATH environments on my system per project to ensure that dependencies are explicitly found under vendor/.

At the end of the day, vendoring (and committing vendor/) is about being in control of your dependencies and being able to achieve reproducible builds. While you can achieve this manually, things that are nice to have in a vendoring tool include:

View gist:0e4e2f5648b91c3bc6c4
import org.ensime.json.FamilyFormats
import spray.json._
object MainApp extends App {
case class Foo(blah: String, blah2: Option[String])
case class Bar(boo: List[Foo])
val wat = Bar(Foo("dfsdf", Some("dsfd")) :: Foo("feefef", None) :: Nil)
davegurnell / anorm.scala
Last active May 17, 2019
A short guide to Anorm
View anorm.scala
To run a query using anorm you need to do three things:
1. Connect to the database (with or without a transaction)
2. Create an instance of `anorm.SqlQuery` using the `SQL` string interpolator
3. Call one of the methods on `SqlQuery` to actually run the query
Integralist / 1. Designing Systems and
Last active May 5, 2017
Designing Systems and Applications
View 1. Designing Systems and

Designing Systems and Applications

This is a short document of tips and notes I've accumulated while learning more about designing distributed systems and building concurrent applications. It is by no means definitive and merely scratches the surface of what is needed to be considered when designing an architecture expected to handle large scale traffic.

Distributed Systems

Scale out, not up

There reaches a point in your application's design where by merely throwing more hardware at the problem (i.e. "scaling up") will fail to resolve the scalability issues you're encountering.

higepon / API.swift
Last active Aug 22, 2019
An example of JSON API call in Swift
View API.swift
// API.swift
// Created by Taro Minowa on 6/10/14.
// Copyright (c) 2014 Higepon Taro Minowa. All rights reserved.
import Foundation
typealias JSONDictionary = Dictionary<String, AnyObject>
mschoebel / main.go
Created Mar 6, 2014
Snippet: login/logout (Golang)
View main.go
package main
import (
// cookie handling
bitemyapp / gist:8739525
Last active Sep 10, 2019
Learning Haskell
View gist:8739525
linjunpop /
Last active May 9, 2018
Deploy Rails 4 app with Dokku on DigitalOcean

Deploy Rails 4 app with Dokku on DigitalOcean

Install dokku

First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel

Then ssh with root account, run this in termianl:

$ wget -qO- | sudo bash
JamesDullaghan /
Created Jul 6, 2013
Deploy rails app to digitalocean with nginx, unicorn, capistrano & postgres

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh root@

Add ssh fingerprint and enter password provided in email

# coding=UTF-8
from __future__ import division
import re
# This is a naive text summarization algorithm
# Created by Shlomi Babluki
# April, 2013
class SummaryTool(object):
You can’t perform that action at this time.