Skip to content

Instantly share code, notes, and snippets.

@fgggid
fgggid / 10-setup-glider.sh
Last active December 8, 2021 14:28
glider on edgerouter
#!/usr/bin/env bash
GLIDER_TAR_BALL=/config/user-data/glider.tgz
DEST_FOLDER=/tmp/glider
BIN_FILE=/tmp/glider/glider
OLD_FILE=/tmp/glider/glider.old
PID_FILE=/tmp/glider/glider.pid
CFG_FILE=/tmp/glider/glider.conf
QUIET=
#VPS_IP=`getent ahostsv4 <your server domain> | head -1 | awk '{print $1}'`
VPS_IP=x.x.x.x
#!/usr/bin/env python
#
# Building a tar file chunk-by-chunk.
#
# taken from https://gist.github.com/chipx86/9598b1e4a9a1a7831054
# This is a quick bit of sample code for streaming data to a tar file,
# building it piece-by-piece. The tarfile is built on-the-fly and streamed
# back out. This is useful for web applications that need to dynamically
# build a tar file without swamping the server.
import os
#!/bin/sh
#
# tcpping: test response times using TCP SYN packets
# URL: http://www.vdberg.org/~richard/tcpping.html
#
# uses tcptraceroute from http://michael.toren.net/code/tcptraceroute/
#
# (c) 2002-2005 Richard van den Berg <richard@vdberg.org> under the GPL
# http://www.gnu.org/copyleft/gpl.html
#
@fgggid
fgggid / vnet-restart.py
Last active July 23, 2016 13:18
improved version of restart libvirt network
#!/usr/bin/env python
#
# Script to enable restarting a network:
# network interfaces are detached / reattached
#
# (c) Luis M Pena <coderazzi@gmail.com> 2014
# Version 1.1
#
# This work is herewith placed in public domain.