Skip to content

Instantly share code, notes, and snippets.

View stefanluptak's full-sized avatar

Stefan Luptak stefanluptak

View GitHub Profile
@barisbalic
barisbalic / gist:4be05987f8e464d07634
Created December 2, 2015 15:40
Zip files erlang/elixir
iex(9)> files = [{'test.zip', "ABCBED"}]
[{'test.zip', "ABCBED"}]
iex(10)> :zip.create('mem', files, [:memory])
{:ok,
{'mem',
<<80, 75, ...>>}}
@dstrelau
dstrelau / app.rb
Created November 22, 2010 20:36
Gollum protected by HTTP Basic
require 'gollum/frontend/app'
require 'digest/sha1'
class App < Precious::App
User = Struct.new(:name, :email, :password_hash)
before { authenticate! }
helpers do
def authenticate!