Skip to content

Instantly share code, notes, and snippets.

@davidbeauchamp
davidbeauchamp / tincup-and-tincdown
Created November 26, 2016 23:03
tinc-up and tinc-down using ip instead of ifconfig
tinc-up.sh, don't forget to chmod +x
#!/bin/sh
ip link set $INTERFACE up
ip addr add your.ip.addr.here/32 dev $INTERFACE
ip route add your.ip.subnet.here/24 dev $INTERFACE
# tinc-down.sh, don't forget to chmod +x
#!/bin/sh
ip route del your.ip.subnet.here/24 dev $INTERFACE
ip addr del your.ip.addr.here/32 dev $INTERFACE
@davidbeauchamp
davidbeauchamp / androidqtpsql.sh
Last active January 29, 2018 13:52
PostgreSQL Driver for Qt on Android builder script
#!/bin/bash
# Contributor: David Beauchamp <david ($at) xtuple ($dot) com>
# Description: Build PostgreSQL 9.5.0 libpq for android 4.1.2 armv7h (no reason you can't use another API level)
#
# Based on https://wiki.qt.io/Build_Qt_5_PostgreSQL_Plugin_for_Android
# Originally created by https://gist.github.com/RazZziel/fd607459c1f07a43cdf9
# Some code taken from https://gist.github.com/hpctech/a16f94f7ac3524d49219
# you may need to modify the below paths
export WORKDIR=$(pwd)
@davidbeauchamp
davidbeauchamp / emrk-reinstall-custom.sh
Created December 20, 2015 16:36
EdgeMax Recovery Kit Customized Script
#!/bin/sh
#
# emrk-reinstall: EdgeOS installer
#
# Maintainer: Daniil Baturin <daniil at baturin dot org>
#
# Copyright (C) 2013 SO3Group
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
var _list = mywindow.list();
populateMenu = function(pMenu, pItem, pCol)
{
if(pMenu == null) {
pMenu = _list.findChild("_menu");
}
if(pMenu != null)
{