Initially taken by Niko Matsakis and lightly edited by Ryan Levick
- Introductions
- Cargo inside large build systems
- FFI
- Foundations and financial support
-- Resource: https://github.com/timotta/wrk-scripts/blob/master/multiplepaths.lua | |
-- Initialize the pseudo random number generator | |
-- Resource: http://lua-users.org/wiki/MathLibraryTutorial | |
math.randomseed(os.time()) | |
math.random(); math.random(); math.random() | |
-- Shuffle array | |
-- Returns a randomly shuffled array | |
function shuffle(paths) |
#!/bin/bash | |
set -e | |
set -o pipefail | |
# Add user to k8s using service account, no RBAC (must create RBAC after this script) | |
if [[ -z "$1" ]] || [[ -z "$2" ]]; then | |
echo "usage: $0 <service_account_name> <namespace>" | |
exit 1 | |
fi |
HANDY ONE-LINERS FOR SED (Unix stream editor) Oct. 29, 1997 | |
compiled by Eric Pement <[email protected]> version 4.3 | |
Latest version of this file is always at <http://www.wollery.demon.co.uk> | |
FILE SPACING: | |
# double space a file | |
sed G | |
# triple space a file | |
sed 'G;G' |
--- ----------------- ---- | |
Map Quick Explanation Link | |
--- ----------------- ---- | |
< <F1> Causes Netrw to issue help | |
<cr> Netrw will enter the directory or read the file |netrw-cr| | |
<del> Netrw will attempt to remove the file/directory |netrw-del| | |
<c-h> Edit file hiding list |netrw-ctrl-h| | |
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l| | |
<c-r> Browse using a gvim server |netrw-ctrl-r| | |
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab| |
service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval
(in minutes)service.beta.kubernetes.io/aws-load-balancer-access-log-enabled
(true|false)service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
service.beta.kubernetes.io/aws-load-balancer-backend-protocol
(http|https|ssl|tcp)service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled
(true|false)service.beta.kubernetes.io/aws-load-balancer-connection-draining-timeout
(in seconds)# | |
# Run in the foreground locally | |
# nginx -p . -c nginx.conf | |
# | |
worker_processes 1; | |
daemon off; | |
error_log nginx_error.log; | |
events { | |
worker_connections 1024; |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
import hashlib as hasher | |
import datetime as date | |
# Define what a Snakecoin block is | |
class Block: | |
def __init__(self, index, timestamp, data, previous_hash): | |
self.index = index | |
self.timestamp = timestamp | |
self.data = data | |
self.previous_hash = previous_hash |