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/ruby | |
# | |
# This script fixes /usr/local only. | |
# | |
# 6th January 2010: | |
# Modified the script to just fix, rather than install. - rpavlik | |
# | |
# 30th March 2010: | |
# Added a check to make sure user is in the staff group. This was a problem | |
# for me, and I think it was due to me migrating my account over several |
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
import time, datetime | |
length=5 # 5 minutes from now | |
start_time = datetime.datetime.strftime(datetime.datetime.now(), "%Y-%m-%d %H:%M:%S") | |
stop_time = datetime.datetime.strftime(datetime.datetime.now() + datetime.timedelta(minutes=int(length)), "%Y-%m-%d %H:%M:%S") | |
epoch_start_local = int(time.mktime(datetime.datetime.now().timetuple())) | |
epoch_start_utc = int(time.mktime(datetime.datetime.utcnow().timetuple())) | |
epoch_stop_local = int(time.mktime(datetime.datetime.timetuple(datetime.datetime.now() + datetime.timedelta(minutes=length)))) | |
epoch_stop_utc = int(time.mktime(datetime.datetime.timetuple(datetime.datetime.utcnow() + datetime.timedelta(minutes=5)))) | |
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
/** | |
* HipChat plugin for the uptime project - https://github.com/fzaninotto/uptime | |
* | |
* This index.js files goes to a directory `plugins/hipchat` in your installation of uptime. | |
* | |
* Notifies all events (up, down, paused, restarted) to HipChat | |
* | |
* This plugin has a dependency on `hipchatter`. | |
* Add this to the "dependencies" object in your `package.json` file : | |
* |
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
Usage: | |
jira (-a|--action) <action> [(-f|--file) <file>] [--encoding <encoding>] [--debug] [-v|--verbose] [--quiet] [--outputFormat | |
<outputFormat>] [--connectionTimeout <connectionTimeout>] [--sql <sql>] [--driver <driver>] [--url <url>] [--host <host>] [--port | |
<port>] [--database <database>] [--dbUser <dbUser>] [--dbPassword <dbPassword>] [--propertyFile <propertyFile>] [--common <common>] | |
[--findReplace <findReplace>] [--findReplaceRegex <findReplaceRegex>] [--list <list>] [--continue] [--simulate] (-s|--server) | |
<server> (-u|--user) <user> (-p|--password) <password> [--login <login>] [--service <service>] [-l|--loginFromStandardInput] | |
[--project <project>] [--toProject <toProject>] [--name <name>] [--description <description>] [--lead <lead>] [--defaultAssignee | |
<defaultAssignee>] [--after <after>] [--issue <issue>] [--toIssue <toIssue>] [--parent <parent>] [--summary <summary>] [--priority |
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
/** | |
* Pushover plugin for the uptime project - https://github.com/fzaninotto/uptime | |
* Thanks to DMathieu for the Campfire plugin which I basically hacked up to make this | |
* work: https://gist.github.com/dmathieu/5592418 | |
* | |
* This index.js files goes to a directory `plugins/pushover` in your installation of uptime. | |
* | |
* Notifies all events (up, down, paused, restarted) to pushover | |
* | |
* This plugin has a dependency on `pushover-notifications`. |
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
{ | |
"checks": { | |
"noisy_queue_check": { | |
"handler": "default", | |
"command": "/etc/sensu/plugins/check-queue-length.rb", | |
"interval": 60, | |
"refresh": 60, | |
"occurrences": 10, | |
"subscribers": [ | |
"workers" |
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 | |
# NOTE: Brackets are not supported and '$' in values will break the script. | |
mkdir /etc/nginx/sites-enabled 2> /dev/null | |
for file in /etc/nginx/sites-available/*.conf | |
do | |
TPL=$(cat $file) | |
for row in $(env) | |
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
#!/usr/bin/env python3 | |
""" | |
Show and adjust display parameters on an Iiyama ProLite XB2483HSU-B1 monitor | |
Requirements: | |
- mentioned monitor (27' should also work) with DDC/CI setting on | |
- Windows Vista+ | |
- Python 3 |
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
backend default { | |
.host = "127.0.0.1"; | |
.port = "8000"; | |
} | |
# We go BACK to varnish to get it to generate an ESI template that | |
# generates a JSON-P response. | |
backend jsonp_template_backend { | |
.host = "127.0.0.1"; | |
.port = "8070"; |
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
'use strict' | |
const timeout = ms => new Promise(res => setTimeout(res, ms)) | |
function convinceMe (convince) { | |
let unixTime = Math.round(+new Date() / 1000) | |
console.log(`Delay ${convince} at ${unixTime}`) | |
} | |
async function delay () { |
OlderNewer