"I have a trick that makes things easier for me. Since writing is very hard and rewriting is comparatively easy and rather fun, I always write my scripts all the way through as fast as I can, the first day, if possible, putting in crap jokes and pattern dialogue—“Homer, I don’t want you to do that.” “Then I won’t do it.” Then the next day, when I get up, the script’s been written. It’s lousy, but it’s a script. The hard part is done. It’s like a crappy little elf has snuck into my office and badly done all my work for me, and then left with a tip of his crappy hat. All I have to do from that point on is fix it. So I’ve taken a very hard job, writing, and turned it into an easy one, rewriting, overnight. I advise all writers to do their scripts and other writing this way. And be sure to send me a small royalty every time you do it." - John Swartzwelder
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
[HEADER] | |
VERSION=3 | |
[TRACTION] | |
TYPE=RWD ; Wheel drive. Possible options: FWD (Front Wheel Drive), RWD (Rear Wheel Drive) | |
[GEARS] | |
COUNT=6 ; forward gears number | |
GEAR_R=-3.273 ; rear gear ratio | |
; forward gears ratios. must be equal to number of gears defined on count |
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 ruby | |
# frozen_string_literal: true | |
require "ostruct" | |
require "optparse" | |
require "bigdecimal" | |
require "csv" | |
require "pry" | |
## Embedded ScriptUtils library; because, scripting! |
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
# This is a short collection of tools that are useful for managing your | |
# known_hosts file. In this case, I'm using the '-f' flag to specify the | |
# global known_hosts file because I'll be adding many deploy users on this | |
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts | |
# Add entry for host | |
ssh-keyscan -H github.com >> /etc/ssh/ssh_known_hosts | |
# Scan known hosts | |
ssh-keygen -f /etc/ssh/ssh_known_hosts -F github.com |
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 | |
# Bash shell script for generating self-signed certs. Run this in a folder, as it | |
# generates a few files. Large portions of this script were taken from the | |
# following artcile: | |
# | |
# http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html | |
# | |
# Additional alterations by: Brad Landers | |
# Date: 2012-01-27 |
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/sh | |
# Shell script to install your public key on a remote machine | |
# Takes the remote machine name as an argument. | |
# Obviously, the remote machine must accept password authentication, | |
# or one of the other keys in your ssh-agent, for this to work. | |
ID_FILE="${HOME}/.ssh/id_rsa.pub" | |
if [ "-i" = "$1" ]; then |
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 ruby -w -s | |
# -*- coding: utf-8 -*- | |
require 'axlsx' | |
## Some documentation ## | |
### Axlsx Gem ### | |
# Axlsx Docs: http://rubydoc.info/gems/axlsx/frames | |
# Axlsx::DataValidation: http://rubydoc.info/gems/axlsx/Axlsx/DataValidation |
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 | |
######################################################################### | |
# # | |
# # | |
# NATO String converter # | |
# # | |
# Description: converts string (first parameter given) # | |
# to NATO phonetics-alphabet # | |
# # |
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
module ShellScriptUtils | |
class CursedReport | |
def initialize(message = nil) | |
@clear_commands = [] | |
@message = message | |
update @message | |
end | |
def update(message) | |
clear @message # clear the current message |
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
A12345 Jon Osterman | |
A23456 Walter Kovacs | |
A34567 Daniel Dreiberg | |
987 Dr. Manhattan | |
876 Rorshach | |
765 Night Owl | |
A12345 987 | |
A23456 876 |
NewerOlder