This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
dir=$1 | |
minGigs=$2 | |
available=`df --sync $dir | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{print $4}'` | |
#10 Gbytes in Kbytes | |
min=$(($minGigs*1024*1024)) | |
if [ $min -gt $available ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# Usage: ./prowl.sh priority(-2 to 2) app event description | |
# Example: ./prowl.sh 0 "transmission" "torrent has finished" "Coen Brothers Compilation has finised downloading" | |
priority=$1 | |
app=$2 | |
event=$3 | |
description=$4 | |
apikey=fill_in_your_API_key_here | |
if [ $# -ne 4 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
torrent=$1 | |
#destination=$2 | |
destination="[email protected]:/streamer/movie/" | |
extension="\ | |
.avi \ | |
.mp4 \ | |
.mkv \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Const UTF8_BOM = "" | |
Const ForReading = 1 | |
Const ForWriting = 2 | |
Dim fso | |
Set fso = WScript.CreateObject("Scripting.FileSystemObject") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set MYSQLUSER=username | |
set MYSQLPASS=password | |
set BATCHFILE=C:\Temp\auto_built_sql_dump.bat | |
set DUMPPATH=Z:\ | |
set DRIVE=Z: | |
net use %DRIVE% \\somehost\some\networkdrive /user:domain\user password | |
rem building time stamp | |
set tmp_time=%time:~-11,2%.%time:~-8,2%.%time:~-5,2% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
title bigFile.bat | |
set /a x=0 | |
del bigFile | |
mkdir bigFile | |
:loopname | |
fsutil file createnew bigFile\F%x%.tmp 1048576 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:wooot | |
ping -n 5 example.com | |
IF "%ERRORLEVEL%"=="0" GOTO :end | |
GOTO :wooot | |
:end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import mosquitto | |
def on_connect(client, userdata, rc): | |
client.subscribe("vw/temp/1") | |
def on_message(client, userdata, msg): | |
rgb = colorWheel(scaleTempToColor(float(msg.payload))) | |
client.publish("vw/neo/color", ','.join(str(x) for x in rgb)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import mosquitto, sys, datetime | |
min = float(sys.argv[1]) | |
max = float(sys.argv[2]) | |
stopTime = datetime.datetime.strptime(sys.argv[3], "%H:%M").time() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, time, mosquitto, subprocess | |
# cronjon | |
# */2 * * * * /usr/bin/python /root/mqttHeartbeat.py 2>&1 > /dev/null | |
pidFile = '/var/run/mqttHeartbeatPid' | |
def on_connect(userdata, flags, rc): | |
print "connected..." |
OlderNewer