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.
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.
mainly used in start-up script
When we play with iptables aka firewall we might end up in situation, where we execute rule, which has unforseen impact - lock yourself out. Recovering from this situation is necessity.
How to:
- Enable reboot via SMS.
- Test all commands in shell first before putting them into Start-up script. This way the command will be wiped out, when unit is rebooted.
| /// <reference path="../tsd/tsd.d.ts" /> | |
| import mongoose = require('mongoose'); | |
| import passport = require('passport'); | |
| interface IUser extends mongoose.Document { | |
| provider: string; | |
| id: string; | |
| authorId: string; | |
| displayName: string; |
| package main | |
| import ( | |
| "bytes" | |
| "encoding/gob" | |
| "fmt" | |
| ) | |
| type MyFace interface { | |
| A() |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "net" | |
| "os" | |
| "time" | |
| ) |
What is sync.Pool in golang and How to use it
sync.Pool (1/2)
Many Go libraries include custom thread-safe free lists, like this:
var objPool = make(chan *Object, 10)
func obj() *Object {
select {
| #version 130 | |
| #pragma optionNV(unroll all) | |
| uint ROTLEFT(in uint a, in int b) { return (a << b) | (a >> (32-b)); } | |
| uint ROTRIGHT(in uint a, in int b) { return (a >> b) | (a << (32-b)); } | |
| uint CH(in uint x,in uint y,in uint z) { return (x & y) ^ (~x & z); } | |
| uint MAJ(in uint x,in uint y,in uint z) { return (x & y) ^ (x & z) ^ (y & z); } | |
| uint EP0(in uint x) { return ROTRIGHT(x,2) ^ ROTRIGHT(x,13) ^ ROTRIGHT(x,22); } | |
| uint EP1(in uint x) { return ROTRIGHT(x,6) ^ ROTRIGHT(x,11) ^ ROTRIGHT(x,25); } |
| function construct(constructor, args) { | |
| function F() { | |
| return constructor.apply(this, args); | |
| } | |
| F.prototype = constructor.prototype; | |
| return new F(); | |
| } | |
| // Sanboxer | |
| function sandboxcode(string, inject) { | |
| "use strict"; |
| #!/bin/bash | |
| if [ "$4" == "" ]; then | |
| echo "usage: $0 <local_ip> <remote_ip> <new_local_ip> <new_remote_ip>" | |
| echo "creates an ipsec tunnel between two machines" | |
| exit 1 | |
| fi | |
| SRC="$1"; shift | |
| DST="$1"; shift |