Skip to content

Instantly share code, notes, and snippets.

View joa's full-sized avatar

Joa Ebert joa

View GitHub Profile
server {
listen 80;
server_name konklone.com;
return 301 https://$host$request_uri;
}
# optional: the 'spdy' at the end of the listen command below turns on SPDY support.
server {
listen 443 ssl spdy;
@joa
joa / gist:7446637
Created November 13, 2013 10:07 — forked from anonymous/gist:7446622
static int[] t = {0, 5, 1, 6, 4, 3, 2, 7};
int foo(final byte value) {
int x = value & 0xff;
x |= x >> 1;
x |= x >> 2;
x |= x >> 4;
x *= 0x1d;
x &= 0xff;
x >>= 5;