Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
# in order to download release artifacts from github, you have to first retreive the | |
# list of asset URLs using the github repo REST API. Use the asset URL to download | |
# the artifact as a octet-stream data stream. You will need to get an access token | |
# from "settings -> developer settings -> personal access tokens" on the github UI | |
#!/bin/bash -e | |
owner="MY_ORG_NAME" | |
repo="MY_REPO_NAME" | |
tag="ARTIFACT_TAG" | |
artifact="ARTIFACT_NAME" |
In a terminal start a server.
$ python -m SimpleHTTPServer 8000
In another terminal set up the cgroups freezer.
#/!bin/sh | |
# usage: sniff.sh <interface> [<interface>...] | |
# create a dummy to mirror all traffic to | |
ip link add dev sniffer type dummy | |
ip link set dev sniffer up | |
# intermediate dummy, needed because AF_PACKET-sockets gets the packet | |
# as seen before any tc-actions have been applied to it. | |
ip link add dev untag type dummy |
#!/bin/bash | |
#### Restart Bluetooth | |
if [ "$1" == "resetBT" ] ; then | |
sudo rfkill block bluetooth && sleep 0.1 && sudo rfkill unblock bluetooth; | |
exit; | |
fi; | |
#### Toggle listen/speak | |
if [ "$1" == "" -o "$1" == "toggle" ] ; then |
/* { | |
* @t[0] = time(); | |
* @reads[pid()] = quantize(arg2) | |
* } | |
*/ | |
prog->ast = | |
node_expr("", | |
node_expr("=", | |
node_expr("[]", | |
node_ident("@t"), |
#!/bin/sh | |
CTARGET="$1" | |
if [ -z "$CTARGET" ]; then | |
program=$(basename $0) | |
echo "usage: $program TARGET_ARCH" | |
return 1 | |
fi | |
# get abuild configurables |
This is a play proposal for a new wrapper around go build
that would build your binary but
wrap it in code that would prepare isolation around your binary on run.
A concept of this is in https://github.com/jfrazelle/binctr, in that it takes a docker image and embeds the contents into a final binary so you have a self-contained binary.
The binctr example is unnessesarily heavy for go
binaries because all you need is a completely static
binary.
#!/bin/bash | |
# | |
# This version uses September 2017 august stretch image, please use this image | |
# | |
if [ "$EUID" -ne 0 ] | |
then echo "Must be root" | |
exit | |
fi |