Skip to content

Instantly share code, notes, and snippets.

View lpil's full-sized avatar
🦦
Ahoy!

Louis Pilfold lpil

🦦
Ahoy!
View GitHub Profile
@lpil
lpil / my_app.ex
Created June 17, 2016 10:27 — forked from alanpeabody/my_app.ex
Websockets in Elixir with Cowboy and Plug
defmodule MyApp do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
Plug.Adapters.Cowboy.child_spec(:http, MyApp.Router, [], [
dispatch: dispatch
])
@lpil
lpil / phoenix showdown rackspace onmetal io.md
Created June 14, 2016 21:33 — forked from omnibs/phoenix showdown rackspace onmetal io.md
Phoenix Showdown Comparative Benchmarks @ Rackspace

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)
@lpil
lpil / README.md
Created March 22, 2016 14:29 — forked from joakimk/README.md
CircleCI elixir build example

This runs a build for a small elixir (phoenix) project in about 40 seconds by caching as much of the compiled files as possible.

We've been using this for months in multiple projects without any issues. Please ping be if there is any issues with this script and I'll update it.

It should be generic enough to work on any elixir app using mix.

If you have a elixir_buildpack.config, then enable that section in the build script to keep versions in sync!

@lpil
lpil / gist:f3128d8c222b6fb0c7ee
Created October 23, 2015 16:49 — forked from alco/gist:2165064
Count the number of non-blank SLOC in an Elixir project
git ls-files | egrep '\.erl|\.ex[s]$' | xargs cat | sed '/^$/d' | wc -l
@lpil
lpil / nginxproxy.md
Created September 24, 2015 10:40 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@lpil
lpil / gittruncatehistory.sh
Last active September 11, 2015 17:01 — forked from magnetikonline/gittruncatehistory.sh
Truncate Git history to a specific SHA1, dropping everything before it.
#!/bin/bash -e
# Lifted from: https://github.com/adrienthebo/git-tools/blob/master/git-truncate
# Note: seem to be finding the need to run this twice over to commit the truncate
if [[ (-z $1) || (-z $2) ]]; then
echo "Usage: $(basename $0) <drop before SHA1 commit> <branch>"
exit 1
fi
git filter-branch --parent-filter "sed -e 's/-p $1[0-9a-f]*//'" \
@lpil
lpil / routes.rake
Last active August 29, 2015 14:19 — forked from oivoodoo/routes.rake
namespace :grape do
desc 'Print compiled grape routes'
task :routes => :environment do
API.routes.each do |route|
puts route
end
end
end

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post