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
# -*- coding: utf-8 -*- | |
import valve.rcon | |
import requests | |
import json | |
import re | |
import http.client as http_client | |
# TODO update /home/tf2server/.local/lib/python3.6/site-packages/valve/rcon.py to set encoding=utf-8 so this will work | |
# CONFIG | |
min_players = 3 # min players to trigger a status post |
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 | |
import binascii, sys, json | |
import version, tnetstring, flow | |
from datetime import datetime | |
def create_har(flows): | |
return { | |
"log":{ |
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 | |
REPO_BASE_URL='ssh://[email protected]:1234/some-project-space' | |
REPOS='foo bar baz quux' | |
echo -e "\e[1;95;102mStarted at $(date) \e[0m" | |
BASEDIR="${PWD}" | |
for repo in $REPOS; do | |
dirname="${repo}.git" | |
echo -e "Now processing \e[1;95m${dirname}\e[0m" |
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
// ==UserScript== | |
// @name Kickass Add Button | |
// @namespace http://your.homepage/ | |
// @version 0.1 | |
// @description enter something useful | |
// @author You | |
// @match https://kickass.tld/* | |
// @grant none | |
// ==/UserScript== |
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
startup_message off | |
activity "%c activity -> %n%f %t" | |
#caption always "%{= Wk}%-w%{= Bw}%n %t%{-}%+w %-=" | |
#vbell off | |
term screen-256color | |
hardstatus on | |
hardstatus alwayslastline '%{= M} %H%{= G} %l %= %{= w}%-w%{+b r}%n*%t%{-b r}%{w}%+w %= %{c}%d %D %{B}%c ' | |
escape ^\\ |
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
window.fn.showFor = function (jqSelector, fadeOutTimeMs, fadeInTimeMs) { | |
// usage: rosetta.fn.showFor('#element-id', 5000) // shows #element-id for 5 seconds, then slow fades out | |
if (! fadeInTimeMs) { fadeInTimeMs = 1000; } | |
if (! fadeOutTimeMs) { fadeOutTimeMs = 5000; } | |
$(jqSelector).removeClass('hidden').fadeIn(parseInt(fadeInTimeMs)); | |
setTimeout(function () { | |
$(jqSelector).fadeOut(1000, function () { |
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
alias hcpipe='tee >(cat >&2 >&1)| curl --location -XPOST https://api.hipchat.com/v2/room/HIPCHAT-API-ROOM-NUMBER/notification?auth_token=YOUR-HIPCHAT-NOTIFY-AUTH-TOKEN-FOR-THAT-ROOM -H "Content-Type: text/plain" -d "/code $(cat 2>&1)"' |
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
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
#!/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 |
NewerOlder