This file contains hidden or 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 | |
# tssh -- Andrew Fresh <andrew AT AFresh1.com> | |
set -e | |
if [ -z "$*" ]; then | |
echo "usage: tssh server1 [[[server2] server3] ...]" | |
exit 2 | |
fi | |
new="" |
This file contains hidden or 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 | |
# replaces the c_rehash perl script from openssl. | |
# by afresh1 | |
rm -f *.[0-9]* *.r[0-9]* | |
for c in *.pem; do | |
[ "$c" = "*.pem" ] && continue | |
hash=$(openssl x509 -noout -hash -in "$c") | |
if egrep -q -- '-BEGIN( X509 | TRUSTED | )CERTIFICATE-' "$c"; then | |
suf=0 |
This file contains hidden or 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
labels = [ | |
{ "name": "Priority: Low", "color": "#009800" }, | |
{ "name": "Priority: Medium", "color": "#fbca04" }, | |
{ "name": "Priority: High", "color": "#eb6420" }, | |
{ "name": "Priority: Critical", "color": "#e11d21" }, | |
{ "name": "Status: Abandoned", "color": "#000000" }, | |
{ "name": "Status: Accepted", "color": "#009800" }, | |
{ "name": "Status: Available", "color": "#bfe5bf" }, | |
{ "name": "Status: Blocked", "color": "#e11d21" }, | |
{ "name": "Status: Completed", "color": "#006b75" }, |
This file contains hidden or 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 | |
if ! pgrep xlock >/dev/null 2>&1; then | |
xlock -lockdelay 0 & | |
sleep 1 | |
fi | |
sudo -k | |
ssh-add -D |
This file contains hidden or 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/perl | |
use strict; | |
use warnings; | |
$| = 1; | |
print "foo: bar\r\n" for 1 .. 15; | |
print "\r\n"; | |
print "quux\r\n"; |
This file contains hidden or 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 | |
exec perl -Mojo -E '$m=a("/");$m->static->paths(["."]);$m->start' daemon |
This file contains hidden or 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 plackup -s FCGIDropPrivs | |
use strict; | |
use warnings; | |
my ($user, $group) = qw( nobody nogroup ); | |
my $uid = getpwnam($user); | |
my $gid = getgrnam($group); | |
my $root = '/var/empty'; | |
package Plack::Handler::FCGIDropPrivs; |
This file contains hidden or 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
if [ ! "$TMUX" ]; then | |
echo "Starting tmux . . ." | |
sleep 3 | |
[ "$TERM" = "xterm" ] && TERM=xterm-256color | |
tmux -2 attach || tmux -2 | |
exit | |
fi |
This file contains hidden or 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/perl | |
# Copyright (c) 2015 Andrew Fresh <[email protected]> | |
# | |
# Permission to use, copy, modify, and distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
This file contains hidden or 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/perl | |
use strict; | |
use warnings; | |
use feature 'say'; | |
use feature 'signatures'; | |
no warnings 'experimental::signatures'; | |
use Sys::Hostname; | |
use HTTP::Tiny; |