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
# Session 3 | |
sudo setsid bash -l < /var/run/my-telnet > /var/run/my-telnet 2>&1 # Bash expects itself as a session leader |
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
#!/sbin/sysctl -p | |
kernel.grsecurity.chroot_caps = 0 | |
kernel.grsecurity.chroot_deny_mount = 0 |
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
python_library( | |
name='executor', | |
sources=rglobs('*.py'), | |
dependencies=[ | |
'3rdparty/python:mesos.executor', | |
'3rdparty/python:mesos.interface', | |
'3rdparty/python:pex', | |
'3rdparty/python:protobuf', | |
], | |
provides=setup_py( |
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
Slave::run(FrameworkInfo&, ExecutorInfo, Option<TaskInfo>, Option<TaskGroupInfo>, UPID&); | |
|-> Slave::unschedule(path: string&) -> Future<bool>; // path = paths::getFrameworkPath(work_dir: string&, SlaveID&, FrameworkID&) -> string; | |
|-> Slave::unschedule(path: string&) -> Future<bool>; // path = paths::getFrameworkPath(metaDir: string&, SlaveID&, FrameworkID&) -> string; | |
|-> Slave::unschedule(path: string&) -> Future<bool>; // path = paths::getExecutorPath(work_dir: string&, SlaveID&, FrameworkID&, ExecutorID&) -> string; | |
|-> Slave::unschedule(path: string&) -> Future<bool>; // path = paths::getExecutorPath(metaDir: string&, SlaveID&, FrameworkID&, ExecutorID&) -> string; | |
\-> Slave::_run(Future<bool>&, FrameworkInfo&, ExecutorInfo&, Option<TaskInfo>&, Option<TaskGroupInfo>&); | |
|-> Slave::authorizeTask(TaskInfo&, FrameworkInfo&) -> Future<bool>; | |
\-> Slave::__run(Future<list<bool>>&, FrameworkInfo&, ExecutorInfo&, Option<TaskInfo>&, Option<TaskGroupInfo>&); | |
|-> Slave::launchExecutor(Option<Future< |
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
echo 'deb http://httpredir.debian.org/debian jessie-backports main contrib non-free' >> /etc/apt/sources.list | |
apt-get update | |
apt-get install -y apt-transport-https ca-certificates | |
apt-get install -y linux-image-4.7.0-0.bpo.1-amd64 linux-headers-4.7.0-0.bpo.1-amd64 linux-base=4.3~bpo8+1 | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo 'deb https://apt.dockerproject.org/repo debian-jessie main' > /etc/apt/sources.list.d/docker.list | |
apt-get update | |
apt-get install -y docker-engine |
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 ruby | |
require 'erb' | |
require 'json' | |
require 'optparse' | |
require 'ostruct' | |
class ERBContext | |
def initialize(hash) | |
raise ArgumentError, 'hash must be a Hash object' unless hash.is_a?(::Hash) |
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 python | |
# This snippet generates a chart showing tax changes after China's 2011 Individual Income Tax Adjustment Draft. | |
# Both NumPy & PyLab are required here. Please make sure you have these libs installed. | |
import sys | |
from pylab import arange, array, frompyfunc, plot, show | |
from taxes import NEW_THRESHOLD, NEW_TAX_LEVELS, OLD_THRESHOLD, OLD_TAX_LEVELS, income_tax |