title | date | reveal_theme | reveal_transition | reveal_transitionSpeed | reveal_slideNumber |
---|---|---|---|---|---|
EbbRT+NodeJS (Unikernel 7/11/17) |
2017-07-12 |
sky |
slide |
fast |
false |
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
my_serv=$1 | |
net_id=$(docker service inspect --format '{{.Endpoint.VirtualIPs}}' $my_serv | cut -c 3- | cut -d ' ' -f 1) | |
net_name=$(docker network inspect --format '{{.Name}}' $net_id) | |
docker service ps --format '{{.ID}} {{.Node}}' $my_serv | | |
while read serv_id node_id; | |
do | |
cont_id=$(docker inspect --format '{{.Status.ContainerStatus.ContainerID}}' $serv_id 2> /dev/null) | |
node_ip=$(docker node inspect $node_id --format '{{ .Status.Addr }}' 2> /dev/null) | |
cont_ip=$(docker -H $node_ip inspect --format '{{index .NetworkSettings.Networks "'$net_name'" "IPAddress"}}' $cont_id 2> /dev/null) |
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
du -h --max-depth=1 $HOME 2>/dev/null | grep '[0-9\.]\+G' |
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
static int current_cpu = -1; | |
int max_cpus = 8 * sizeof(cpu_set_t); | |
cpu_set_t m; | |
CPU_ZERO(&m); | |
sched_getaffinity(0, sizeof(cpu_set_t), &m); | |
for (int i = 0; i < max_cpus; ++i) { | |
int c = (current_cpu + i + 1) % max_cpus; | |
if (CPU_ISSET(c, &m)) { | |
CPU_ZERO(&m); | |
CPU_SET(c, &m); |
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
#commandline | |
ssh -o ProxyCommand='nc -x localhost:5000 %h %p ' {destination} | |
#~/.ssh/config | |
ProxyCommand ssh {destination} -W %h:%p |
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
dnsmasq -z --dhcp-range=192.168.0.50,192.168.0.199,255.255.255.0 --interface=tap100 --except-interface=lo --listen-address=192.168.0.3 | |
-dhcp-range=<start>,<end>,<mask> | |
-listen-address=<ip of interface> |
cp /usr/lib/systemd/system/[email protected] /usr/lib/systemd/system/[email protected]
update file: [/usr/lib/systemd/system/[email protected]]
add in the line ExecStart= -a USERNAMe after --noclear
example:
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
git config --global alias.lg 'log --all --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset" --abbrev-commit' |