Skip to content

Instantly share code, notes, and snippets.

View dguerrar's full-sized avatar

dguerrar dguerrar

  • Spain
View GitHub Profile
@dguerrar
dguerrar / apache-balancer.sh
Created May 27, 2019 12:27 — forked from SeonghoonKim/apache-balancer.sh
Apache HTTPD balancer-manager control script
#! /bin/sh
# Set up a default search path
PATH="/usr/bin:/bin"
CURL=`which curl`
if [ -z "$CURL" ]; then
echo "curl not found"
exit 1
fi
@dguerrar
dguerrar / gist:d432c8bc0cad00e0ddb1
Created March 14, 2016 14:53 — forked from peel/gist:ca8c5b25efbe3052fdb5
SJ4000 WIFI Protocol

#Base URL http://192.168.1.254

File Management Panel

GET / file management panel

Configuration options

all options follow the template: /?custom=1&cmd={Command}&par={Option} Command - setting/mode of the device

/**
* This is called when your application is upgraded and it has a higher version number. This allows you to adjust the various data to
* match the new version number.
*/
@Override
public void onUpgrade(final SQLiteDatabase db, final ConnectionSource connectionSource, int oldVersion, final int newVersion) {
Logger.i(LOG_TAG, "onUpgrade, oldVersion=[%s], newVersion=[%s]", oldVersion, newVersion);
try {
// Simply loop round until newest version has been reached and add the appropriate migration
while (++oldVersion <= newVersion) {