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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
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
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does | |
import hudson.model.*; | |
import hudson.util.*; | |
import jenkins.model.*; | |
import hudson.FilePath.FileCallable; | |
import hudson.slaves.OfflineCause; | |
import hudson.node_monitors.*; | |
for (node in Jenkins.instance.nodes) { |
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=TeamCity Build Agent | |
After=network.target | |
[Service] | |
Type=forking | |
PIDFile=$AGENT_HOME/logs/buildAgent.pid | |
ExecStart=/usr/bin/sudo -u teamcity $AGENT_HOME/bin/agent.sh start | |
ExecStop=/usr/bin/sudo -u teamcity $AGENT_HOME/bin/agent.sh stop |
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
Jenkins.instance.getTrigger("SCMTrigger").getRunners().each() | |
{ | |
item -> | |
long millis = Calendar.instance.time.time - item.getStartTime() | |
if(millis > (1000 * 60 * 60)) // 1000 millis in a second * 60 seconds in a minute * 3 minutes | |
{ | |
Thread.getAllStackTraces().keySet().each() | |
{ | |
tItem -> |
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 Office 365 Notifications | |
// @namespace http://tampermonkey.net/ | |
// @version 0.4 | |
// @description try to take over the world! | |
// @author Brandon Parker | |
// @match https://outlook.office365.com/* | |
// @match https://outlook.office.com/* | |
// @iconURL https://r1.res.office365.com/owa/prem/16.1630.12.2223203/resources/images/0/favicon_mail.ico | |
// @UpdateURL https://gist.githubusercontent.com/bparker98/fdd125541c8ec9c676ca435e9eb9165a/raw/o365-notifications.user.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
listen l1 | |
bind 0.0.0.0:443 | |
mode tcp | |
timeout connect 4000 | |
timeout client 180000 | |
timeout server 180000 | |
server srv1 host.example.com:9443 |