Skip to content

Instantly share code, notes, and snippets.

@jsravn
jsravn / interfaces
Created June 12, 2018 12:46
/etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# vdsl modem / wan port
auto eth0
iface eth0 inet static
address 192.168.10.2
netmask 255.255.255.0
# to support jumbo frames on ppp (1500 mtu + 8 byte PPPoE overhead)
@jsravn
jsravn / ip_vs_sh-fixed.c
Created December 24, 2017 21:54
ip_vs_sh with fixed hash shift
/*
* IPVS: Source Hashing scheduling module
*
* Authors: Wensong Zhang <wensong@gnuchina.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
@jsravn
jsravn / ConnectionDrainingFilter.java
Last active December 4, 2017 20:37
ConnectionDrainingFilter.java
/*
Copyright (c) 2017, Sky UK Ltd All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the
following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and