TBD
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
codename=$(lsb_release -c | awk '{print $2}') | |
sudo tee /etc/apt/sources.list.d/ddebs.list << EOF | |
deb http://ddebs.ubuntu.com/ ${codename} main restricted universe multiverse | |
deb http://ddebs.ubuntu.com/ ${codename}-security main restricted universe multiverse | |
deb http://ddebs.ubuntu.com/ ${codename}-updates main restricted universe multiverse | |
deb http://ddebs.ubuntu.com/ ${codename}-proposed main restricted universe multiverse | |
EOF | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ECDCAD72428D7C01 | |
sudo apt-get update |
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
# ASIA | |
_ = '173.194.36.%s' # del 印度 新德里 | |
SG3 = '173.194.38.%s' # 新加坡 | |
TW3 = '173.194.72.%s' | |
SG4 = '173.194.117.%s' | |
JP2 = '173.194.120.%s' | |
_ = '173.194.123.%s' | |
JP1 = '173.194.126.%s' | |
HK1 = '173.194.127.%s' | |
TW1 = '74.125.23.%s' |
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
define -mem-heap-dump-chunk | |
printf "%#016x: ", $mem_addr | |
printf "%016lu %016lu %#02x ", ((long *)$mem_addr)[0], ((long *)$mem_addr)[1] & ~3, ((long*)$mem_addr)[1] & 3 | |
printf "%016x %016x\n", ((long *)$mem_addr)[2], ((long *)$mem_addr)[3] | |
set $mem_addr = $mem_addr + ((long *)$mem_addr)[1] & ~3 | |
end | |
document -mem-heap-dump-chunk | |
!!! FOR INTERNAL USE ONLY - DO NOT CALL !!! | |
end |
I recently happened upon a very interesting implementation of popen()
(different API, same idea) called popen-noshell using clone(2)
, and so I opened an issue requesting use of vfork(2)
or posix_spawn()
for portability. It turns out that on Linux there's an important advantage to using clone(2)
. I think I should capture the things I wrote there in a better place. A gist, a blog, whatever.
This is not a paper. I assume reader familiarity with
fork()
in particular and Unix in general, though, of course, I link to relevant wiki pages, so if the unfamiliar reader is willing to go down the rabbit hole, they should be able to come ou
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
#!/usr/bin/env bash | |
# set -x | |
if [[ $EUID -ne 0 ]]; then | |
echo "You must be root to run this script" | |
exit 1 | |
fi | |
# Returns all available interfaces, except "lo" and "veth*". |
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
[user] | |
name = Pavan Kumar Sunkara | |
email = pavan.sss1991@gmail.com | |
username = pksunkara | |
[init] | |
defaultBranch = master | |
[core] | |
editor = nvim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
pager = delta |