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 ruby | |
=begin Display the multiplication tables | |
My first computer program, written in Sept 1978, did the same | |
thing. I did not know about iteration using for or while and | |
so it was implemented using if and goto :-(. This was on an | |
ICL mainframe using MAXIMOP BASIC. | |
As you can see computer science, and I, have moved on since. |
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 expect -f | |
# Start the CISCO VPN client on a Mac. Adapted from | |
# https://blog.felipe-alfaro.com/2014/05/23/automating-cisco-anyconnect-secure-mobility-client-on-mac-os-x/ | |
set HOSTNAME vpn.server.com | |
set USER_NAME user.name | |
set PASSWORD password | |
spawn /opt/cisco/anyconnect/bin/vpn |
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 | |
# Set up my PocketCHIP (Debian Linux) | |
# NB It's recommended you set up ssh key auth before running this script | |
# Extra tools -- edit this to suite what you want on your CHIP | |
OPTIONAL_PACKAGES="vim-gtk git build-essential python-serial arduino arduino-mk" | |
# Update | |
# 1st lets fix an occasional but obscure problem during upgrade |
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
A list of brew packages | |
ack | |
ansible | |
ant | |
aspell | |
autoconf | |
automake | |
bfg | |
byacc | |
c-ares |
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
# Make the pi run file system check/repair on every boot (need to clear out old settings 1st) | |
sudo sed -i -e 's/ fsck\.\(repair\|mode\)=[^ ]*//; | |
s/$/ fsck.mode=force fsck.repair=yes/' /boot/cmdline.txt |
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 python3 | |
print("S",end='') | |
for i in range(int(10E3)): | |
print('o',end='') | |
print('n',end=None) | |
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
The MIT License (MIT) | |
Copyright (c) 2015 ajfisher | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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 | |
# ssh into a running Virtual Box guest machine | |
if [[ $# == 0 || $1 == -h || $1 == -? || $1 == --help ]] ; then | |
echo | |
echo usage: $(basename $0) '[<username>@]<machinename>' | |
echo | |
echo 'ssh into Virtual Box <machinename>, optionlly using <username>' | |
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
# Use the GNU utils instead of the BSD versions from OS X | |
# Updates the path if anythings with a gnubin dir changes after | |
# upgrade | |
if [[ -n "$(brew --prefix )" ]] ; then | |
if [[ -e ~/.GNUBINS ]] ; then | |
GNUBINS=$(cat ~/.GNUBINS) | |
else | |
echo "Not Found GNUBINS" | |
GNUBINS="___NotFoundGNUBINS___" | |
fi |