Skip to content

Instantly share code, notes, and snippets.

View thewellington's full-sized avatar

W. S. Wellington thewellington

View GitHub Profile
@thewellington
thewellington / no_password_expire.sql
Last active December 25, 2015 04:49
Oracle: Prevent password from expiring in the future
/* Set Oracle to prevent password form expiring */
alter profile default limit password_life_time unlimited;
@thewellington
thewellington / osx-welcome.sh
Last active December 24, 2015 03:19
After building an OS X image, start the mac at the welcome screenSo... I needed to deploy a number of macs to a great number of people... and they all needed to have an "out of box" experience with the machine whereby they set up their own account and all the happy stuff that Apple gives you when you take a Mac out of the box. This script allowe…
#!/bin/bash
#
# v.1.1 by [email protected]
# adapted from instructions posted at
# http://www.macgurulounge.com/easily-prep-mac-resale/
#
# This script sets a Mac up to start at the welcome screen.
# It must be run from single user mode, so put it somewhere on
# the file system, make it executable, then reboot and hold down cmd-s
#
@thewellington
thewellington / upload-authorized-keys.sh
Last active December 24, 2015 03:19
Used to upload keys to specific accounts usage: upload-authorized-keys.sh shellacct@hostname /path/to/key.pub
#!/bin/sh
#
# upload-authorized-keys.sh
# by [email protected]
#
# This script will take a key provided as an argument on the commandline and
# add it to the authorized_keys file on a remote server. It can be used to
# upload many keys in a short time, particularly once your key is already loaded.
#
# Usage: upload-authorized-keys.sh shellacct@hostname /path/to/local/copy/of/key.pub
@thewellington
thewellington / upload-my-key.sh
Created September 27, 2013 22:36
I use this to upload my key to servers
#!/bin/sh
# KEY="$HOME/.ssh/id_dsa.pub"
KEY="$HOME/.ssh/id_rsa.pub"
if [ ! -f ~/.ssh/id_rsa.pub ];then
echo "private key not found at $KEY"
echo "* please create it with "ssh-keygen -t [rsa|dsa]" *"
echo "* to login to the remote host without a password, don't give the key you create with ssh-keygen a password! *"
exit
@thewellington
thewellington / flushdns
Last active January 18, 2023 02:10
Flush DNS in OS X
#!/bin/bash
#
# flushdns
# This script will flush your DNS cache on Mac OS X 10.1 - 13.x
# The method for doing this chages it seems in every version of OS X,
# and I can never remember the correct command, so I wrote this script
# and gave it a name I could remeber.
#
# v.2022-11-03 by [email protected]
# https://gist.github.com/thewellington/6736175
@thewellington
thewellington / log
Created September 27, 2013 22:33
I use this script to log everything I do throughout the day
#!/usr/bin/env python
# myLogger.py by [email protected] - 2012-11-14
# This module takes additional commandline arguments, concatenates them into a
# string, and then appends that string to a defined output file.
#
# Intended to be an easy to access work log for all things that I have completed
#
# import necessary modules
@thewellington
thewellington / start-the-day.sh
Last active November 10, 2016 12:01
This is a simple script I use to start my day in OS X
#!/bin/bash
#
# start-the-day.sh
# I use this script to start all the programs I need to "start my day"
#
# v1.7 2013-01-12 by [email protected]
source ~/bin/switch.sh
open -a "TotalTerminal" -F -g