This file contains 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
[Unit] | |
Description=Sends SMS to notify about system coming up | |
After=network.target | |
[Service] | |
ExecStart=/usr/local/bin/notify-up.sh | |
Type=oneshot | |
[Install] | |
WantedBy=default.target |
This file contains 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 | |
dest=$1 | |
test -n "$dest" || exit 1 | |
read text | |
user=`whoami` | |
retries=5 | |
cont=1 | |
while test $retries -gt 0 -a $cont -ne 0; do |
This file contains 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/bash | |
set -x | |
msg="$SERVER has started." | |
shutdown_dt=$(last -x --time-format iso |grep shutdown | head -n 1 | awk '{print $7}') | |
if [ -n "$shutdown_dt" ]; then | |
msg="$msg Shutdown at $shutdown_dt" | |
fi |
This file contains 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/env python | |
#pylint: indent-string=' ' | |
import serial | |
import daemon | |
import signal | |
import lockfile | |
import time | |
import getopt | |
import os |
This file contains 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/env python | |
# -*- coding: utf-8 -*- | |
# --------------------------------------------------------------------------- | |
# This software is in the public domain, furnished "as is", without technical | |
# support, and with no warranty, express or implied, as to its usefulness for | |
# any purpose. | |
# | |
# Usage: | |
# ./dump_wallet_addresses.py <wallet binary> | |
# |
This file contains 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
/* Copyright (c) MediaArea.net SARL. All Rights Reserved. | |
* | |
* Use of this source code is governed by a BSD-style license that can | |
* be found in the License.html file in the root of the source tree. | |
*/ | |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
// Linux: g++ -o howtouse HowToUse_Dll.cpp -lmediainfo -lzen -ldl | |
// Windows: cl /Fehowtouse.exe HowToUse_Dll.cpp | |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
This file contains 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
/* | |
* A Node.js script that clones all non-forked repos and all gists on GitHub | |
* for a user. If the repos/gists have been cloned already, the script pulls | |
* new commits from GitHub instead. | |
* | |
* Usage: | |
* | |
* node ghclone.js -u <user> -p <password> -d <destination dir> | |
* | |
* Tested with Node.js version 0.6.7. |
This file contains 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 -W ignore::DeprecationWarning | |
"""rel_unpack.py - unpacks the contents of a release directory, optionally | |
checking SFV check sums prior to unpacking. The script only handles RAR | |
compressed content, and descends into any CD sub directories as well. | |
Usage: rel_unpack.py <release directory> | |
This script relies on the 'unrar' binary being installed. For SFV checking | |
to take place, the cfv Python module must be present. |
This file contains 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 | |
# Based on getifaddrs.py from pydlnadms [http://code.google.com/p/pydlnadms/]. | |
# Only tested on Linux! | |
from socket import AF_INET, AF_INET6, inet_ntop | |
from ctypes import ( | |
Structure, Union, POINTER, | |
pointer, get_errno, cast, | |
c_ushort, c_byte, c_void_p, c_char_p, c_uint, c_int, c_uint16, c_uint32 |
This file contains 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/bash | |
# Script that downloads and builds defender-prototype and lambda (Project Lambda). | |
set -e | |
set -u | |
function error_exit() | |
{ | |
echo >&2 $@ |
NewerOlder