This guide uses the domain your-domain.tld
and its www.
prefixed version.
It starts the rocket application on 127.0.0.1:1337
and as the user www-data
. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script is a very naive XML parser for sh | |
# ... | |
# This fontion is called once for each file. It initialize the parser | |
# | |
# Type: private | |
# Parameters: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define CONCATENATE(arg1, arg2) arg1##arg2 | |
#define IN_NARG(...) IN_NARG_(__VA_ARGS__, IN_RSEQ_N()) | |
#define IN_NARG_(...) IN_ARG_N(__VA_ARGS__) | |
#define IN_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, _9, N, ...) N | |
#define IN_RSEQ_N() 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 | |
#define IN_1(x, v, ...) ((v) == (x)) | |
#define IN_2(x, v, ...) ((v) == (x)) || IN_1(x, __VA_ARGS__) | |
#define IN_3(x, v, ...) ((v) == (x)) || IN_2(x, __VA_ARGS__) |
I hereby claim:
- I am glejeune on github.
- I am glejeune (https://keybase.io/glejeune) on keybase.
- I have a public key ASCOfHi10nVD7yaNQBeZpEoifx74zJpPDIBBbsSnlqaqWQo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(message). | |
-export([decode/3, decode/4, encode/1]). | |
decode(M1, M2, M3) -> | |
decode(M1, M2, M3, float_to_integer(length(M1)/8 - 1)). | |
decode(M1, M2, M3, Size) -> | |
[L1, L2, L3] = [[list_to_integer(string:substr(M, I*8+1, 8), 2) || I <- lists:seq(0, Size)] || M <- [M1, M2, M3]], | |
[A bxor B bxor C || {A, B, C} <- lists:zip3(L1, L2, L3)]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
usage() { | |
echo "$0 /path/to/image.dmg [/output/path]" | |
exit 0 | |
} | |
DMG=$1 | |
OUTPUT=$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'mp3info' | |
require 'readline' | |
TAGS = { | |
"AENC" => "Audio encryption", | |
"APIC" => "Attached picture", | |
"COMM" => "Comments", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'tempfile' | |
require 'rubygems' | |
require 'gtkmozembed' | |
require 'markdown' | |
class MarkdownViewer < Gtk::Window | |
def initialize(file) | |
super | |
NewerOlder