Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

vrrp_script chk_haproxy {
script "killall -0 haproxy" # verify the pid existance. `killall -0 haproxy` or `pidof haproxy`
interval 2 # check every 2 seconds
weight 2 # add 2 points of prio if OK
}
vrrp_instance VI_1 {
interface eth0 # interface to monitor
state MASTER
virtual_router_id 51 # Assign one ID for this route
#!/usr/bin/env bash
tunnel_v2ray_client_docker() {
SERVER_PORT=1080
CONFIG_PATH=/etc/v2ray/config.json
tunnel_v2ray_client_config
CONTAINER_NAME=v2ray
CONTAINER_ID=`docker ps -aq --filter=name=$CONTAINER_NAME`
[ -z "$CONTAINER_ID" ] || docker rm -f $CONTAINER_ID
#!/usr/bin/env bash
tunnel_v2ray_server_docker() {
CONFIG_PATH=/etc/v2ray/config.json
tunnel_v2ray_server_config
CONTAINER_NAME=v2ray
CONTAINER_ID=`docker ps -aq --filter=name=$CONTAINER_NAME`
[ -z "$CONTAINER_ID" ] || docker rm -f $CONTAINER_ID
docker run -d \
var FindProxyForURL = function(init, profiles) {
return function(url, host) {
"use strict";
var result = init, scheme = url.substr(0, url.indexOf(":"));
do {
result = profiles[result];
if (typeof result === "function") result = result(url, host, scheme);
} while (typeof result !== "string" || result.charCodeAt(0) === 43);
return result;
};
@soleil0-0
soleil0-0 / install.sh
Created October 5, 2015 17:13
XFCE-Arch-RPi
pacman -S --noconfirm base-devel wget git
# desktop environment
pacman -S --noconfirm xfce4 xorg-server xf86-video-fbdev
# networkmanager
pacman -S --noconfirm NetworkManager nm-applet xfce4-notifyd
# yaourt
cd /tmp
@soleil0-0
soleil0-0 / autoWin.txt
Last active August 29, 2015 14:18
BoxstarterScript
# System Management
#cinst ccleaner
#cinst chocolateypackageupdater
#cinst rufus
# Dev Env
#cinst jdk7
#cinst jdk8
#cinst nodejs
cinst python