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 | |
| set -eu | |
| container="$(basename "$0")" | |
| program="$1" | |
| shift | |
| # logname returns the user calling sudo | |
| host_user="$(logname)" |
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/sh | |
| set -u | |
| WIN_NAME="${WIN_NAME:-PDC1 Pooled}" | |
| WAKE_MINS="${WAKE_MINS:-10}" | |
| hash xdotool || { | |
| >&2 echo "xdotool is required: http://www.semicomplete.com/projects/xdotool/" | |
| exit 1 |
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 | |
| set -eu | |
| usage() { | |
| local basename | |
| basename="$(basename "$0")" | |
| cat<<USAGE | |
| Usage: |
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
| // ==UserScript== | |
| // @name webvpn session extender | |
| // @namespace https://github.com/ncoop | |
| // @description Stay logged in to the webvpn landing page | |
| // @homepageURL https://gist.github.com/ncoop/6a3ffe9b22e125015deeb025b4585fb8 | |
| // @include https://webvpn.raytheon.com/dana/home/index.cgi | |
| // @icon https://gist.githubusercontent.com/ncoop/6a3ffe9b22e125015deeb025b4585fb8/raw/726136f10feafb28c8aa81fa8a31033b9ff1d4a1/wfica-mod.png | |
| // @version 0.2.4 | |
| // @grant none | |
| // ==/UserScript== |
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 | |
| set -eu | |
| # This script is intended to be run as the xautolock locker and notifier. | |
| # It requires i3lock, and dunst is optional. | |
| # Copy or link this script as /usr/bin/slock to let xfce4-session run it. | |
| if [ "$(basename "$0")" = "slock" ]; then | |
| cmd=lock |
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
| // ==UserScript== | |
| // @name rclouddesktop session extender | |
| // @namespace https://github.com/ncoop | |
| // @description Stay logged in to the rclouddesktop landing page | |
| // @homepageURL https://gist.github.com/ncoop/2015139fa43529cf09d09090f14ee4cd | |
| // @include https://rclouddesktop.raytheon.com/Citrix/XenApp1/site/* | |
| // @icon https://gist.githubusercontent.com/ncoop/2015139fa43529cf09d09090f14ee4cd/raw/b0dfe386383487d1e0311dbd47e7dd2367d2eb88/wfica-256.png | |
| // @version 0.2.5 | |
| // @grant none | |
| // ==/UserScript== |
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 | |
| set -euo pipefail | |
| usage() { | |
| local basename | |
| basename="$(basename "$0")" | |
| cat <<DOC | |
| Usage: | |
| $basename [options] [mount|unmount] [mtp_device_number] |
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 | |
| set -eu | |
| srcfile1="$1" | |
| srcfile2="out.pdf" | |
| out="${srcfile1%\.*}-signed.${srcfile1##*\.}" | |
| gs -dBATCH -dNOPAUSE -dQUIET -sDEVICE=pdfwrite \ | |
| -dLastPage=1 -sOutputFile="$out" "$srcfile1" "$srcfile2" |
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 | |
| # use ImageMagick to convert the given image to a favicon | |
| # http://www.imagemagick.org/Usage/thumbnails/#favicon | |
| usage() { | |
| >&2 echo "usage: $(basename "$0") input [output]" | |
| } | |
| set -eu | |
| input="${1:-}" | |
| output="${2:=favicon}" |
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 | |
| # convert all m3u8 playlists (UTF-8 encoding) in current dir to m3u (ASCII) | |
| # required for compatibility with some media players | |
| for pl in *.m3u8 | |
| do iconv -f UTF-8 -t ASCII//TRANSLIT "$pl" > "${pl%\.m3u8}.m3u" | |
| echo "converted $pl" | |
| done |