1) Filter Table
Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.
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
// these aren't _quite_ functional tests, | |
// and should all be compile_fail, | |
// but may be illustrative | |
#[test] | |
fn concurrent_set() { | |
use std::sync::Arc; | |
let x = Arc::new(Cell::new(42)); | |
let x1 = Arc::clone(&x); | |
std::thread::spawn(move || { |
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
import time | |
scale = 50 | |
print("starting".center(scale // 2,"-")) | |
start = time.perf_counter() | |
for i in range(scale + 1): | |
a = "*" * i | |
b = "." * (scale - i) | |
c = (i / scale) * 100 | |
dur = time.perf_counter() - start | |
print("\r{:^3.0f}%[{}->{}]{:.2f}s".format(c,a,b,dur),end = "") |
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
# archive the entire repo | |
git archive --format=tar.gz -o fastone-upgrade-guide.tar.gz --prefix=fastone-upgrade-guide/ master | |
# archive the given directory[upgrade] of the repo | |
git archive --format=tar.gz -o fastone-upgrade-guide.tar.gz --prefix=fastone-upgrade-guide/ HEAD:upgrade/ |
Hi! I'm your first Markdown file in StackEdit. If you want to learn about StackEdit, you can read me. If you want to play with Markdown, you can edit me. Once you have finished with me, you can create new files by opening the file explorer on the left corner of the navigation bar.
StackEdit stores your files in your browser, which means all your files are automatically saved locally and are accessible offline!
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
location /__special { | |
internal; | |
allow all; | |
root /usr/share/nginx/html/__special; | |
} | |
location = /__md_file { | |
internal; | |
allow all; |
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
#change it to latest version | |
NPS_VERSION=1.11.33.0; | |
echo "Changing Directory to $HOME..." | |
cd $HOME; | |
echo "Nginx version to install: " && \ | |
read NGINX_VERSION && \ | |
echo "Downloading nginx-$NGINX_VERSION..." && \ | |
wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz && \ | |
echo "Installing Nginx Dependencies..." && \ |
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
# | |
# Slightly tighter CORS config for nginx | |
# | |
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs | |
# | |
# Despite the W3C guidance suggesting that a list of origins can be passed as part of | |
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox) | |
# don't seem to play nicely with this. | |
# |
NewerOlder