Skip to content

Instantly share code, notes, and snippets.

View AndrewDryga's full-sized avatar

Andrew Dryga AndrewDryga

View GitHub Profile
@henrik
henrik / poolboy_demo.ex
Last active December 16, 2020 13:56 — forked from sasa1977/poolboy_demo.ex
Example of using Poolboy in Elixir to limit concurrency (e.g. of HTTP requests).
defmodule HttpRequester do
use GenServer
def start_link(_) do
GenServer.start_link(__MODULE__, nil, [])
end
def fetch(server, url) do
# Don't use cast: http://blog.elixirsips.com/2014/07/16/errata-dont-use-cast-in-a-poolboy-transaction/
timeout_ms = 10_000
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 30, 2024 04:42
A badass list of frontend development resources I collected over time.
@mrnovalles
mrnovalles / signature.erl
Created October 10, 2012 10:16
Erlang signing and verifying hashed data, using openssh keys
-module(signature).
-export([test/0]).
% Looking at using Open SSH public and private keys
% for signing and verifying hashed data.
load_public_key(Filename) ->
{ok, SshBin} = file:read_file(Filename),
[{PubKey,_}] = public_key:ssh_decode(SshBin, public_key),
PubKey.
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt