#!/bin/ash | |
# list installed packages sorted by file size | |
apk info -e -s \* >/tmp/apksize | |
awk 'NR % 3 == 1' /tmp/apksize | cut -d ' ' -f 1 > /tmp/apkname | |
awk 'NR % 3 == 2' /tmp/apksize > /tmp/apksize2 | |
while read -r n unit; do | |
B=$n | |
case "$unit" in |
[Unit] | |
Description = Foo HTTP server | |
Requires = foo.socket | |
After = multi-user.target | |
[Service] | |
User = www-data | |
Group = www-data | |
WorkingDirectory = /var/foo | |
ExecStart = /var/foo/bin/foo-server |
There are some tests ripped out from git://repo.or.cz/ltp-debian.git/testcases/open_posix_testsuite/conformance/interfaces and made self-containing. They demonstrate and can be used to test the POSIX AIO interface for asynchronous I/O and formerly file IO.
Build with a c compiler (for instance clang
or cc
):
cc -o aio_read-test aio_read-test.c && ./aio_read-test
Note: Contrary to popular belief, it has been tested and confirmed to actually be asynchronous on Darwin 10.6.0 (xnu 1504.9.26~3).
// Find the latest version of this script here: | |
// https://gist.github.com/rsms/a8ad736ba3d448100577de2b88e826de | |
// | |
const EM = 2048 | |
interface FontInfo { | |
familyName :string | |
styleName :string | |
unitsPerEm :int | |
ascender :int |
"use strict"; | |
const fs = require('fs'); | |
const https = require('https'); | |
const outdir = __dirname + '/svg'; | |
function DownloadSVG(codepoint) { | |
return new Promise((resolve, reject) => { | |
let cpstr = codepoint.toString(16).toLowerCase(); |
It is very difficult, particularly for the Western mind, to understand that life is purposeless. And it is beautiful that it is purposeless. If it is purposeful then the whole thing becomes absurd – then who will decide the purpose? Then some God has to be conceived who decides the purpose, and then human beings become just puppets; then no freedom is possible. And if there is some purpose then life becomes businesslike, it cannot be ecstatic.
The West has been thinking in terms of purpose, but the East has been thinking in terms of purposelessness. The East says life is not a business, it is a play. And a play has no purpose really, it is nonpurposeful. Or you can say play is its own purpose, to play is enough. Life is not reaching towards some goal, life itself is the goal. It is not evolving towards some ultimate; this very moment, here and now, life is ultimate.
Life as it is, is accepted in the East. It is not moving towards some end, b
- https://github.com/rsms/move (2011)
- https://github.com/rsms/hue (2012)
- https://github.com/rsms/sol (2012)
- https://github.com/rsms/lum (2013)
- https://github.com/rsms/saturate (2013)
- https://github.com/rsms/rxlang (2014)
- https://github.com/rsms/coxlang (2016)
- https://github.com/rsms/co (2017)
function time_diff(date1, date2) { | |
var future_date, past_date; | |
date1 < date2 ? (past_date = date1, future_date = date2) | |
: (past_date = date2, future_date = date1); | |
var D = {}, | |
t = future_date - past_date, | |
SECOND = 1000, | |
MINUTE = 6e4, | |
HOUR = 36e5, // 60 minutes | |
DAY = 864e5, // 24 hours |
#!/bin/sh | |
set -eo pipefail | |
SOCKFILE="$HOME/Library/Application Support/Playbit/vconsole0.sock" | |
while [ $# -gt 0 ]; do case "$1" in | |
-h|-help|--help) cat <<END | |
Connect a terminal to Playbit | |
Usage: $0 [--help | <sockfile>] | |
<sockfile> defaults to $SOCKFILE |