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
# 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/ |
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. | |
# |
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
var iterations = Math.floor(values.length / 8); | |
var leftover = values.length % 8; | |
var i = 0; | |
if ( leftover > 0 ) | |
{ | |
do { | |
process( values[i++] ); | |
} while ( --leftover > 0 ); | |
} | |
do { |
- Maven shade with Spring Boot
The goal was to create an uber-jar out of the Spring boot application. Following the directions given at Apache went very smoothly yet when I tried to execute the jar a large number of spring beans were missing and not getting loaded during runtime. For example, one of the beans not getting loaded was 'AutoConfigurationPackages'
jar -tvf name.jar | grep AutoConfigurationPackages
showed that the class file was present in tha jar.
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 off | |
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe | |
rem add it for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f |
NewerOlder