- Recipes
- Anonymous GET access
- Anonymous GET access - match HTTP referrer
- Full access for specific IAM user/role
- GET/PUT/DELETE access to specific path within a bucket
- Restricted LIST & PUT/DELETE access to specific path within a bucket
- Full access (and S3 console) for specific IAM users
- Bucket and object delete deny
# Heavily depends on: | |
# libqrencode (fukuchi.org/works/qrencode/) | |
# paperkey (jabberwocky.com/software/paperkey/) | |
# zbar (zbar.sourceforge.net) | |
# Producing the QR codes: | |
# Split over 4 codes to ensure the data per image is not too large. | |
gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp | |
split temp -n 4 IMG | |
for f in IMG*; do cat $f | qrencode -o $f.png; done |
(ns turel.core | |
(:refer-clojure :exclude [==]) | |
(:use clojure.core.logic)) | |
(defn not-membero | |
[x l] | |
(conde [(emptyo l)] | |
[(fresh [head tail] | |
(conso head tail l) | |
(!= head x) |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdbool.h> | |
#define MOVE_NONE 0 | |
#define MOVE_LEFT 1 | |
#define MOVE_RIGHT 2 | |
typedef struct Rule { |
let rec typeof ctx t = | |
match t with | |
TmVar(fi,i,_) -> getTypeFromContext fi ctx i | |
| TmAbs(fi,x,tyT1,t2) -> | |
let ctx' = addbinding ctx x (VarBind(tyT1)) in | |
let tyT2 = typeof ctx' t2 in | |
TyArr(tyT1, tyT2) | |
| TmApp(fi,t1,t2) -> | |
let tyT1 = typeof ctx t1 in | |
let tyT2 = typeof ctx t2 in |
;; This is at: https://gist.github.com/8655399 | |
;; So we want a rhyming dictionary in Clojure. Jack Rusher put up | |
;; this code here: | |
;; | |
;; https://gist.github.com/jackrusher/8640437 | |
;; | |
;; I'm going to study this code and learn as I go. | |
;; | |
;; First I put it in a namespace. |
RDBMS-based job queues have been criticized recently for being unable to handle heavy loads. And they deserve it, to some extent, because the queries used to safely lock a job have been pretty hairy. SELECT FOR UPDATE followed by an UPDATE works fine at first, but then you add more workers, and each is trying to SELECT FOR UPDATE the same row (and maybe throwing NOWAIT in there, then catching the errors and retrying), and things slow down.
On top of that, they have to actually update the row to mark it as locked, so the rest of your workers are sitting there waiting while one of them propagates its lock to disk (and the disks of however many servers you're replicating to). QueueClassic got some mileage out of the novel idea of randomly picking a row near the front of the queue to lock, but I can't still seem to get more than an an extra few hundred jobs per second out of it under heavy load.
So, many developers have started going straight t
type re = C of char | Nil | Seq of re * re | Bot | Alt of re * re | Star of re | |
let rec null = function | |
| C _ | Bot -> false | |
| Nil | Star _ -> true | |
| Alt(r1, r2) -> null r1 || null r2 | |
| Seq(r1, r2) -> null r1 && null r2 | |
module R = Set.Make(struct type t = re let compare = compare end) | |
let rmap f rs = R.fold (fun r -> R.add (f r)) rs R.empty |
This is not intended to be comprehensive or authoritative, just free online resources I've found valuable while learning more about Erlang.
- 0xAX's list of Erlang bookmarks
- Federico Carrone, Erlang Spawned Shelter
- Ivan Uemlianin's list of resources on various BEAM languages
- David Robakowski's curated list of awesome Erlang libraries, resources and shiny things
- Julius Beckmann's curated list of amazingly awesome Elixir and Erlang libraries, resources and shiny things