Host Kernel: rawhide 4.13.0-0.rc6.git4.2.fc28.x86_64 (on Fedora 24)
QEMU is mainline built from sources: QEMU emulator version 2.10.50 (v2.10.0-105-g223cd0e)
Guest: clear-17460-kvm.img (which has vsock support)
| // Companion code for the Linux terminals blog series: https://dev.to/napicella/linux-terminals-tty-pty-and-shell-192e | |
| // I have simplified the code to highlight the interesting bits for the purpose of the blog post: | |
| // - windows resizing is not addressed | |
| // - client does not catch signals (CTRL + C, etc.) to gracefully close the tcp connection | |
| // | |
| // Build: go build -o remote main.go | |
| // In one terminal run: ./remote -server | |
| // In another terminal run: ./remote | |
| // | |
| // Run on multiple machines: |
| set -e | |
| set -u | |
| # hat-tips: | |
| # - http://codeghar.wordpress.com/2011/12/14/automated-customized-debian-installation-using-preseed/ | |
| # - the gist | |
| # required packages (apt-get install) | |
| # xorriso |
kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
This is what the [official documentation][1] says about the terminate/2 callback for a gen_server:
This function is called by a gen_server when it is about to terminate. It should be the opposite of Module:init/1 and do any necessary cleaning up. When it returns, the gen_server terminates with Reason. The return value is ignored.
Reason is a term denoting the stop reason and State is the internal state of the gen_server.
Reason depends on why the gen_server is terminating. If it is because another callback function has returned a stop tuple {stop,..}, Reason will have the value specified in that tuple. If it is due to a failure, Reason is the error reason.
| #!/usr/bin/env bash | |
| # Small wrapper around the actual command used to start the daemon. This | |
| # wrapper allows us to set various environment variables before Ruby is | |
| # started. | |
| # | |
| # See the following URLs for more information on these options and their | |
| # values: | |
| # | |
| # http://samsaffron.com/archive/2014/04/08/ruby-2-1-garbage-collection-ready-for-production |
| ##TCP FLAGS## | |
| Unskilled Attackers Pester Real Security Folks | |
| ============================================== | |
| TCPDUMP FLAGS | |
| Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere) | |
| Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere) | |
| Pester = PSH = [P] (Push Data) | |
| Real = RST = [R] (Reset Connection) | |
| Security = SYN = [S] (Start Connection) |
| #!/usr/bin/env bash | |
| # | |
| # Get the value of a tag for a running EC2 instance. | |
| # | |
| # This can be useful within bootstrapping scripts ("user-data"). | |
| # | |
| # Note the EC3 instance needs to have an IAM role that lets it read tags. The policy | |
| # JSON for this looks like: | |
| # | |
| # { |
| /** | |
| * Given a linked list, remove the nth node from the end of list and return its head. | |
| * For example, | |
| * Given linked list: 1->2->3->4->5, and n = 2. | |
| After removing the second node from the end, the linked list becomes 1->2->3->5. | |
| * Given n will always be valid. | |
| * Try to do this in one pass. | |
| */ | |
| /** |