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
#you may use `lshw -class network` to get mac addresses | |
#wan0 | |
SUBSYSTEM=="net", KERNEL=="eth*", ATTR{address}=="11:22:33:44:55:66", NAME="wan0" | |
#lan0 | |
SUBSYSTEM=="net", KERNEL=="eth*", ATTR{address}=="11:22:33:44:55:67", NAME="lan0" |
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: * | |
Pin: release a=wheezy | |
Pin-Priority: 700 | |
Package: * | |
Pin: release a=jessie | |
Pin-Priority: 650 |
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 | |
set -u | |
COLOR_RED='\e[31m' | |
COLOR_GREEN='\e[31m' | |
RESET_FONT='\e[0m' | |
function printError() { | |
echo -e "${COLOR_RED}${1}${RESET_FONT}" |
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 | |
set -euo pipefail | |
function usage() { | |
echo "${0} <node-name>" | |
exit 1 | |
} | |
function usageError() { |
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 | |
set -euo pipefail | |
THIS_SCRIPT="$0" | |
DEFAULT_MOUNTPOINT="$(dirname $0)/mountpoint" | |
function errcho | |
{ | |
echo "$@" >&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
# build me with: docker build --network host --build-arg UID=$(id -u) --build-arg GID=$(id -g) --build-arg HTTP_PROXY=$http_proxy docker/dev/ -t node-18 | |
# then set an alias tu use me: alias node18c="docker run --rm -ti --mount type=bind,source=.,target=/mnt --mount type=bind,source=${HOME}/.gitconfig,target=/home/node/.gitconfig --network host node-18" | |
# then use me: node18c npm init | |
FROM node:18 | |
USER root:root | |
ARG UID=1000 | |
ARG GID=1000 | |
ARG HTTP_PROXY=http://localhost:3128 |