- aufs support (
grep -w aufs /proc/filesystems
)- might be included in
linux-image-extra-*
packages
- might be included in
- To build SFS files you need:
python
andpython-crypto
lxc-start
,lxc-info
and friends (lxc
orlxc1
package)
mksquashfs
(squashfs-tools
package)
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 | |
set -e | |
test "$(id -u)" = "0" || exec sudo "$0" "$@" | |
: "${SUDO_UID:=1000}" "${SUDO_GID:=1000}" | |
: "${dist:=bionic}" | |
: "${lxc_name:=esteid-$dist}" | |
: "${rootfs:=/var/lib/lxc/$lxc_name/rootfs}" |
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
package main | |
import ( | |
"bytes" | |
"flag" | |
"io" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" |
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 | |
find_scanner() { | |
echo -n "Scanning for scanners.." >&2 | |
scanimage -f %d | |
echo "OK." >&2 | |
} | |
test ! "x$1" = "x-h" || { | |
echo "Usage: ${0##*/} [<scanner>]" >&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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Encrypt and Share</title> | |
<script src="https://unpkg.com/ace-builds@1.3.3/src-noconflict/ace.js" charset="utf-8"></script> | |
<script src="https://unpkg.com/ace-builds@1.3.3/src-noconflict/mode-markdown.js" charset="utf-8"></script> | |
<script src="https://unpkg.com/qrcode@1.2.0/build/qrcode.js" charset="utf-8"></script> | |
<script> | |
"use strict"; |
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
package main | |
import ( | |
"database/sql" | |
"encoding/csv" | |
"fmt" | |
"github.com/lib/pq" | |
"io" | |
"log" | |
"os" |
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
package main | |
import ( | |
"bufio" | |
"database/sql" | |
"flag" | |
"fmt" | |
"log" | |
"math/big" | |
"net" |
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 | |
red="$(tput setaf 1)" green="$(tput setaf 2)" blue="$(tput setaf 4)" | |
sg0="$(tput sgr0)" ul="$(tput smul)" b="$(tput bold)" | |
dq='"' | |
sed -ur \ | |
-e '/^==>/d' \ | |
-e '/^[[:space:]]*$/d' \ | |
-e 's/^.*\[ *[.0-9]*\] //' \ |
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/bash | |
wget https://gist.githubusercontent.com/korc/a4e77451825737ef1fd2c491bd74246e/raw/websrv.go | |
go get -u golang.org/x/{crypto/acme/autocert,net/{webdav,websocket}} | |
go build websrv.go | |
sudo setcap cap_net_bind_service,cap_sys_chroot=ep websrv | |
mkdir -p data/uploads | |
./websrv -map /=file:/var/www/html -map /data/=webdav:$PWD/data/uploads -auth Basic:dGVzdDp0ZXN0 |
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 | |
# Changes WiFi NIC MAC address to MD5-based semi-random value | |
name="$1" | |
iface="$2" | |
: "${ifaces:=$(for i in /sys/class/net/*;do test ! -d $i/wireless || { echo -n "$_s${i##*/}";_s=" ";};done)}" | |
: "${iface:=$(echo "$ifaces" | cut -f1 -d" ")}" |