script

Zoneminder: control module for Bosesh SD13W

Perl module to control the Bosesh SD13W with Zoneminder. SD13W.pm: # ========================================================================== # # ZoneMinder Bosesh SD13W IP Control Protocol Module, $Date: 2017-05-30 01:18:22 +0100 (Wed, 04 Nov 2009) $, $Revision: 1 $ # Copyright (C) 2017 Mentor (http://www.internauta37.altervista.org) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General...

Zoneminder: control module for Vstarcam C7816WIP

Perl module to control the Vstarcam C7816WIP with Zoneminder. C7816WIP.pm: # ========================================================================== # # ZoneMinder Vstarcam C7816WIP IP Control Protocol Module, $Date: 2017-01-15 01:18:10 +0100 (Wed, 04 Nov 2009) $, $Revision: 1 $ # Copyright (C) 2017 Mentor (http://www.internauta37.altervista.org) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the...

Zoneminder: control module for Vstarcam C7824WIP

Perl module to control the Vstarcam C7824WIP with Zoneminder. C7824WIP.pm: # ========================================================================== # # ZoneMinder Vstarcam C7824WIP IP Control Protocol Module, $Date: 2017-01-15 01:17:54 +0100 (Wed, 04 Nov 2009) $, $Revision: 1 $ # Copyright (C) 2017 Mentor (http://www.internauta37.altervista.org) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the...

Bash script to change the Zoneminder's state

Script to change the Zoneminder's state via crontab and to check at boot if the correct state is set. zoneminder_state.sh: #!/bin/bash zmdbuser=`cat /etc/zm/zm.conf | grep ZM_DB_USER | awk -F= '{print $2}' | tr -d ' '` zmdbpass=`cat /etc/zm/zm.conf | grep ZM_DB_PASS | awk -F= '{print $2}' | tr -d ' '` runstate=`mysql -N -B -u$zmdbuser -p$zmdbpass zm -e "select Name from States where isActive=1 LIMIT 1;"` alarmedstate='Armed' #echo $runstate # for debug only function state { if [ "$runstate" != "$alarmedstate" ]; then /usr/bin/zmpkg.pl ${1} else exit fi } function boot { hour=$(date +%H) daystate='Day' nightstate='Night' hour_day_start='8' hour_day_end='24' if [ "$runstate" == "$alarmedstate" ]; then exit elif (( $hour_day_start <= 10#$hour && 10#$hour < $hour_day_end ));...

Linux: bash script to backup the OS

This is a really simple command/script to backup via rsync an entire Linux OS: #!/bin/bash rsync -aAXv --delete --exclude={"/dev/","/home/","/lost+found/","/media/","/mnt/","/proc/","/run/","/sys/","/tmp/"} / /media/Data_Backup/OS/ Source: wiki.archilinux.com

Bash script to backup a Drupal site with an SQLite database

Script to backup via ftp a Drupal site that uses a database SQLite and to then archive it. backup_site.sh: #!/bin/bash # HOST='ftp.site.com' USER='username' PASSWORD='password' BACKUPDIR=$HOME'/backup/site' WORKINGDIR='/tmp' DBPATH='sites/default/files' DBNAME='.ht.sqlite' cd $WORKINGDIR wget -m --preserve-permissions --user=$USER --password=$PASSWORD ftp://$HOST sqlite3 $HOST/$DBPATH/$DBNAME "VACUUM;" while [ $? -ne 0 ]; do wget -m --preserve-permissions --user=$USER --password=$PASSWORD ftp://$HOST/$DBPATH/$DBNAME sqlite3 $HOST/$DBPATH/$DBNAME "VACUUM;" done mkdir -p "$BACKUPDIR" 7z a -mhe -p$PASSWORD "$BACKUPDIR/$HOST-`date +%Y%m%dT%H%M`.7z" "$HOST" rm -r $HOST The script can been executed via cron in this way: 0 20 1 * * bin/backup_site.sh >> bin/cron.log 2>&1

Windows: manually start VMware

Usually VMware automatically start at boot time, to start and stop it manually we can disable the autostart of the following services: VMware Authorization Service VMware DHCP Service VMware NAT Service VMware USB Arbitration Service and we can use a batch script as the following: @echo off echo Start/Stop VMware Workstation services echo. echo 1. Start echo 2. Stop echo. choice /c:12 If...

PowerShell: scripts to check for missing and installed windows updates

These are two scripts for the Windows PowerShell to check for missing and installed windows updates based on this and this . One checks for the missing Windows updates splatting them for Important, Recommended and Hidden. The other checks for the installed Windows updates splatting them for Important and Recommended. They split the updates in Important and Recommended based on how they are setted in the Windows Update Settings. To exeute them you have to unrestrict the PowerShell permissions: Set-ExecutionPolicy Unrestricted To restrict the PowerShell permissions: Set-ExecutionPolicy Restricted

How to delete every post from Facebook timeline

In the last days i decided to remove from the Facebook timeline every thing that i posted but unfortunately there is not a native option to do this. To solve this my problem avoiding to manually delete everything i used a java script: Facebook Timeline Cleaner . As for any java script for the browser to work it needs of an interpreter, GreaseMonkey for Firefox and Tampermonkey for Chrome. This...

Best JavaScript for your browser

Basically, JavaScripts are the prerogative of the creator of an internet site but you can execute them locally so you can change\improve the navigation experience of an internet site. For a long time, the reference site on which to search for any kind of JavaScript was userscrips.org but since it has been closed you can search them on greasyfork.org and on userscripts-mirror.org . In order to use...

Pages

Subscribe to RSS - script