Skip to content

Instantly share code, notes, and snippets.

View cole's full-sized avatar

Cole Maclean cole

View GitHub Profile
@cole
cole / keybase.md
Created October 6, 2019 22:45
Keybase proof

Keybase proof

I hereby claim:

  • I am cole on github.
  • I am colemaclean (https://keybase.io/colemaclean) on keybase.
  • I have a public key ASAJZbZuLpBlXsp2Q__EBipsE0MD_b3HV7tuXxoPnDVyzgo

To claim this, I am signing this object:

@cole
cole / keybase.md
Created September 18, 2014 12:59
Keybase proof

Keybase proof

I hereby claim:

  • I am cole on github.
  • I am colemaclean (https://keybase.io/colemaclean) on keybase.
  • I have a public key whose fingerprint is DB5F 0A0C 98DF 5648 F77A 2022 C66E 4FAC 7F0C F5F4

To claim this, I am signing this object:

@cole
cole / mysqldb.markdown
Created October 8, 2011 18:58 — forked from narfdotpl/mysqldb.markdown
MySQLdb, Python 2.5 and OS X 10.8

MySQLdb, Python 2.5 and OS X 10.8

I've wasted too much time trying to make MySQLdb work with Python 2.5, several times now.

Python 2.5 on OS X 10.6+ is 32=bit. Everything else is probably (depending on your system) 64-bit.

If you see the error:

Traceback (most recent call last):

@cole
cole / update_dyn_dns.sh
Created December 17, 2010 14:34
Update Zoneedit dynamic DNS
#/bin/bash
SCRIPT_NAME="Update Dynamic DNS"
HOSTNAME="athome.mysite.com"
USER="user"
PASSWORD="password"
DYNDNS_SERIVICE_URL="https://dynamic.zoneedit.com/auth/dynamic.html?host=${HOSTNAME}"
# Hit update server
RESPONSE=`/usr/bin/curl --silent --user $USER:$PASSWORD $DYNDNS_SERIVICE_URL`
@cole
cole / Lessn.scpt
Created November 24, 2010 19:46
Shorten clipboard URL using Lessn and TextExpander
-- CONFIGURATION OPTIONS BEGIN
set the yourLessnUrl to "http://yoursite.com/lessn/"
set the yourApiKey to "dsfdasfsadfsdfsadfsdfadsfsdfasdfsadfasdf"
-- CONFIGURATION OPTIONS END
set the LessnURL to (the clipboard as string)
ignoring case
if ((characters 1 through 7 of LessnURL as string) is not "http://") then
return "Malformed URL."
#!/bin/bash
# Convert anything mplayer can play to low quality MP3
IFS="
"
for file in $*; do
if [[ -f "$file" ]];
then
filename=$(basename "$file")
#/bin/bash
SCRIPT_NAME="Rsync Stuff"
BACKUP_SERVER="server.strongspace.com"
BACKUP_USER="user"
BACKUP_PATH="/strongspace/user/home/Stuff/"
LOCAL_PATH="/Users/user/Stuff/"
RSYNC_RSH="ssh -c arcfour -o Compression=yes -x"
date=`date +"%Y-%m-%d %H-%M"`

Setting up Netatalk 2.1 on Nexenta Core 3

Why?

Netatalk file servers work great with macs. ZFS is a great filesystem for storing large amount of data. If you have a home fileserver with multiple redundant drives, this is a great setup.

How?

This setup assumes you have successfully installed Nexenta core 3, and setup your storage pool using ZFS.

sudo apt-get install libdb4.6-dev db4.6-util libssl0.9.8k-dev

<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
<service name='network/avahi' type='service' version='0'>
<create_default_instance enabled='true'/>
<dependency name='avahi-config-file' grouping='require_all' restart_on='none' type='path'>
<service_fmri value='file:///etc/avahi/avahi-daemon.conf'/>
</dependency>
<dependency name='loopback' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/network/loopback:default'/>
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
<service name='network/netatalk' type='service' version='0'>
<create_default_instance enabled='true'/>
<dependency name='netatalk-config-file' grouping='require_all' restart_on='none' type='path'>
<service_fmri value='file:///usr/local/etc/netatalk/netatalk.conf'/>
</dependency>
<dependency name='afpd-config-file' grouping='require_all' restart_on='none' type='path'>
<service_fmri value='file:///usr/local/etc/netatalk/afpd.conf'/>