Scenario: You’ve lost your device. Actually Honest Achmed finds it, and would like to return it to you. However, the label that you had carefully attached to your device was ripped off. How does Achmed know who to return the device to? He attempts to boot the device, but since you use full-disk encryption (you do use full-disk encryption, don’t you?), that doesn’t get him any further than the decryption password prompt. Fortunately, you have arranged for a simple message to be printed before that prompt,
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
# /etc/systemd/system/opendmarc.service | |
[Unit] | |
Description=OpenDMARC email validation system | |
Documentation=man:opendmarc(8) man:opendmarc.conf(5) man:opendmarc-import(8) man:opendmarc-reports(8) http://www.trusteddomain.org/opendmarc/ | |
After=network.target nss-lookup.target | |
[Service] | |
RuntimeDirectory=opendmarc | |
Type=forking | |
PIDFile=/run/opendmarc/opendmarc.pid |
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
journalctl -u postfix -o json | jq -r 'select(.MESSAGE | contains("to=")) | .["_SOURCE_REALTIME_TIMESTAMP"]' | awk '{sec=int($1/(1000*1000)); print sec, int(sec/(60*60*24))}' | uniq -f 1 -c | sort -rn | head | while read count stamp day; do printf '%s\t%s\n' "$count" "$(date -Idate -d @$stamp)"; done |
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
\documentclass{article} | |
\usepackage[utf8]{inputenc} | |
\DeclareUnicodeCharacter{3BB}{\lambda} % λ | |
\newcommand{\var}[1]{\mathtt{#1}} | |
\let\qm=? | |
\catcode`?=13 | |
\def?{% |
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
% colored underline, with Beamer overlay support | |
% usage: \cul{x} or \cul[blue]{x} or \cul<2->{x} or \cul<2->[blue]{x} | |
\newcommand<>{\cul}[2][red]{% |
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
import ceylon.language.meta.model { | |
ClassOrInterface | |
} | |
shared interface Enumeration<Element> of Element | |
given Element satisfies Enumeration<Element> { | |
shared static Element? byName(String name) { | |
assert (is ClassOrInterface<Element> coi = `Element`); | |
return coi.caseValues.find((element) => name == element.name); | |
} |
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
branch=... # the branch you want to turn into an orphan branch | |
base=master # the branch which $branch is based on and shouldn’t be anymore | |
firstCommit=... # the first commit on $branch that’s not on $base | |
# rename $branch to $branch-bak | |
git checkout $branch | |
git checkout -b $branch-bak | |
git branch -d $branch | |
# new orphan $branch |
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
DataDirectory /var/lib/tor | |
#PidFile /var/run/tor/tor.pid | |
#RunAsDaemon 1 | |
#User debian-tor | |
ControlSocket /var/run/tor/control | |
ControlSocketsGroupWritable 1 | |
CookieAuthentication 1 | |
CookieAuthFileGroupReadable 1 |
[Original proposal][proposal]
The original goal was to finish the first iteration of the program, and to get as far as possible with the second iteration, including necessary changes to the compiler.
As explained in the proposal, both iterations produce a Ceylon module
(i. e., modname/modver/modname-modver{,-model}.js{,.sha1}
files)
in a Ceylon module repository (e. g. modules/
).
This module can then be used like any other Ceylon module – moved between repositories, imported from a module descriptor, etc.
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
import java.lang { System { o=\iout, nanoTime }, Double, Long } | |
Integer additions = 10_000_000_000; | |
String format = "%04d. iteration, %8s: %04.1f seconds (%12d ns): %d\n"; | |
Float seconds(Integer t1, Integer t2) => (t2 - t1) / 1.0e9; | |
Integer nanos(Integer t1, Integer t2) => t2 - t1; | |
class C() { | |
@unboxed variable Integer i1 = 0; | |
@boxed variable Integer i2 = 0; |