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 | |
# | |
# Usage: daemonize.sh <pidfile> <exec> [<args>] | |
# | |
# Can be run from a cron job, will only trigger a single daemon to run | |
# and should restart the child daemon process if it fails. | |
usage() { | |
awk '/# Usage/{ x=1 } x==1 { print $0 } !/^#/ && x==1 { exit 0 }' $0 >&2 | |
exit 2 |
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 | |
# | |
# This is a test script | |
# | |
# Usage: easy-shell-usage.sh [<arguments>] | |
# | |
# There aren't any arguments available, but if there were they would be documented here. | |
# Anything in the first block of comments starting at the "Usage" line. | |
# Prints usage, but this comment won't be printed |
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 bash | |
# | |
# To use, encrypt a script with openssl cli and append the contents below the | |
# __ARCHIVE_BELOW__ line. The current example encrypted script takes two args. | |
# The password is "asdf". | |
# | |
# To encrypt: | |
# $ openssl aes-256-cbc -a -salt -in <script name> -out <enc name> | |
ARCHIVE=$(awk '/^__ARCHIVE_BELOW__/ {print NR + 1; exit 0;}' "$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
#!/usr/bin/env bash | |
usage() { | |
cat <<EOF | |
USAGE: sss.sh <script> [<args>] | |
To encrypt file you'll need openssl cli | |
$ openssl aes-256-cbc -a -salt -in <script> -out <enc script> | |
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
Racket (formerly named PLT Scheme) is a general purpose, multi-paradigm | |
programming language in the Lisp/Scheme family. One of its design goals is to | |
serve as a platform for language creation, design, and implementation. The | |
language is used in a variety of contexts such as scripting, general-purpose | |
programming, computer science education, and research. (source: Wikipedia) | |
racket is the command line version, drracket is the GUI-version | |
This SlackBuild uses the src + built packages distribution. It builds | |
faster as it contains platform-independent bytecode. If you wish to build |
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/bash | |
#=============================================================================== | |
# Copyright (c) 2017 Jeff Parent | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# | |
# * Redistributions of source code must retain the above copyright notice, | |
# this list of conditions and the following disclaimer. |
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
# Name: New Defect Automation | |
# Author: Jeff Parent | |
# Date: 2016/08/12 20:40:03 | |
# Changes: | |
# 0.5 - Added P4PORT configuration and using Promises | |
# 0.3 - Writes to Todo.txt and Perforce | |
set version "0.5" | |
package provide app-newdefect $version |
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
" Keybase - saltpack | |
augroup SALTPACK | |
au! | |
" Make sure nothing is written to ~/.viminfo | |
au BufReadPre,FileReadPre *.saltpack set viminfo= | |
" No other files with unencrypted info | |
au BufReadPre,FileReadPre *.saltpack set noswapfile noundofile nobackup | |
" Reading Files, assumes you can decrypt | |
au BufReadPost,FileReadPost *.saltpack :%!keybase decrypt |
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
# crypto.tcl -- | |
# | |
# This file implements and example Tk applicaiton that uses | |
# AES encryption, Channels and Transforms. | |
# | |
# Copyright (c) 2016 Jeff Parent | |
# | |
# This code is licensed under the Creative Commons Attribution-ShareAlike 4.0 | |
# International license (CC BY-SA 4.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
# Requires tcllib | |
package require aes | |
package require tcl::transform::base64 | |
package require md5 | |
# Make some sort of key data, 16, 24, or 32 bytes long | |
set key [string repeat - 16] | |
# Generate an IV, 16 bytes long. MD5 of clock ticks, the Proc ID, and | |
# a random value. Take 16 bytes. |
NewerOlder