Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
# Fortemente baseado em https://github.com/jpetazzo/pipework | |
function add_veth_pair { | |
pid=$1 ; ipaddr=$2 ; container_ifname=$3 | |
echo "Add interface $container_ifname with ip $ipaddr to container pid $pid" | |
local_ifname="v${container_ifname}l${pid}" | |
guest_ifname="v${container_ifname}g${pid}" | |
bridge='docker0' | |
mtu=$(ip link show $bridge | awk '{print $5}') | |
if ip link show "$local_ifname" >/dev/null 2>&1 ; then | |
ip link del "$local_ifname" |
# -*- coding: utf-8 -*- | |
""" | |
################################################################################ | |
Dump ElasticSearch index for inserting BULK | |
################################################################################ | |
requires `rawes`. | |
for more details, run `-h` to show help message. |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
ns1.linode.com. 300 IN A 162.159.27.72 | |
ns1.linode.com. 300 IN AAAA 2400:cb00:2049:1::a29f:1a63 | |
ns2.linode.com. 300 IN A 162.159.24.39 | |
ns2.linode.com. 300 IN AAAA 2400:cb00:2049:1::a29f:1827 | |
ns3.linode.com. 300 IN A 162.159.25.129 | |
ns3.linode.com. 300 IN AAAA 2400:cb00:2049:1::a29f:1981 | |
ns4.linode.com. 300 IN A 162.159.26.99 | |
ns4.linode.com. 300 IN AAAA 2400:cb00:2049:1::a29f:1b48 | |
ns5.linode.com. 300 IN A 162.159.24.25 | |
ns5.linode.com. 300 IN AAAA 2400:cb00:2049:1::a29f:1819 |
# This config came around after a friend had problems with a Steam cache on his | |
# Cox internet connection. Cox would intercept any requests to Steam content | |
# servers and return a 302 to Cox's servers. The cache would return the 302 | |
# to the Steam client, and the Steam client would go directly to Cox, bypassing | |
# the cache. | |
# This config makes nginx follow the 302 itself, and caches the result of the | |
# redirect as if it was the response to the original request. So subsequent | |
# requests to the URL that returned a 302 will get the file instead of a 302. |
import os | |
from django.conf import settings | |
from django.http.request import HttpRequest | |
from django.http.response import HttpResponse, HttpResponseRedirectBase | |
def http_redirect(request=HttpRequest): | |
bbox = [float(i) for i in request.GET.get('bbox').split(',')[:4]] | |
layers = request.GET.get('layers').replace(':', '_') |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
# goto https://www.linkedin.com/feed/following/ | |
# in JS console run | |
var buttons = $("button"), | |
interval = setInterval(function(){ | |
var btn = $('.is-following'); | |
console.log("Clicking:", btn); | |
btn.click(); | |
if (buttons.length === 0) { | |
clearInterval(interval); |
def jobName = '(...)' | |
Jenkins.instance.getItemByFullName(jobName).builds.findAll { it.result == Result.FAILURE}.each { it.delete() } |