View notify-up.service
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 |
View send-sms.sh
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 |
View notify-up.sh
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 |
View NUnitNSpec.cs
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
// Obsolete, see https://github.com/provegard/NSpecInNUnit |
View ivt490d.py
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 |
View dump_wallet_addresses.py
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> | |
# |
View 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
/* 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 | |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
View blanket_jasmine.js
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
/*! blanket - v1.0.1 */ | |
/* | |
Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com> | |
Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be> | |
Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl> | |
Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com> | |
Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com> | |
Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com> | |
Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com> |
View AsyncTester.cs
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
using System; | |
using System.Collections.Concurrent; | |
using System.Diagnostics; | |
using System.Threading; | |
// Custom synchronization context for testing asynchronous background workers. | |
// See http://int.li/15 for the full story! | |
public class AsyncTester : SynchronizationContext, IDisposable | |
{ | |
private readonly int _timeoutMs; |
View Meh.cs
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
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Linq; | |
using System.Windows.Forms; | |
public static class Meh | |
{ | |
private static readonly IDictionary<DockStyle, Func<Control, Point>> DockAdjusters = new Dictionary<DockStyle, Func<Control, Point>> | |
{ |
NewerOlder