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 forked to fit MY needs. Please read through and edit at will. | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' |
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
import SystemConfiguration | |
prefs = SystemConfiguration.SCPreferencesCreate(None, "SystemConfiguration", None) | |
print SystemConfiguration.SCPreferencesGetValue(prefs, "System")["System"]["ComputerName"] |
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
import objc, re, os | |
from Foundation import * | |
from AppKit import * | |
from PyObjCTools import NibClassBuilder, AppHelper | |
# poach one of the iSync internal images to get things rolling | |
status_images = {'idle':'/Users/tehnix/Desktop/dropboxstatus-pause-lep.png'} | |
start_time = NSDate.date() |
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 | |
# Script: cocoaDialogTests.sh | |
# Author: Mark Carver | |
# Created: 2011-09-23 | |
# Updated: 2012-07-24 | |
# Copyright (c) 2012 Mark Carver. All rights reserved. | |
cocoaDialog(){ | |
# Replace this with your path if it isn't installed in the applications folder. | |
/Users/Shared/Applications/cocoaDialog.app/Contents/MacOS/cocoaDialog "${@}"; |
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 python | |
""" | |
Sort CSV file by multiple columns, writing output to sorted CSV file. | |
Recommended for files saved in Windows CSV format. | |
Useful for situations where data file is too large for Excel. | |
: param source_file.csv : source csv file. Must end in .csv | |
: param sort column 1 : first sort in Excel-like column number (i.e., 1 ... N) | |
Use negative number to indicate descending sort, | |
Positive number to indicate ascending sort_step |
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
ssl with cheapssl and apache2 | |
-Purchase a ssl certificate | |
sudo a2enmod ssl | |
sudo /etc/init.d/apache2 restart | |
sudo mkdir /etc/apache2/ssl | |
cd /etc/apache2/ssl | |
******EDIT THE LINE BELOW WITH DOMAIN****** | |
sudo openssl req -new -nodes -newkey rsa:2048 -keyout MYDOMAIN.key -out MYDOMAIN.csr |
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
Section "InputClass" | |
Identifier "touchpad catchall" | |
Driver "synaptics" | |
MatchIsTouchpad "on" | |
MatchDevicePath "/dev/input/event*" | |
Option "ClickPad" "1" | |
Option "TapButton1" "1" | |
Option "TapButton2" "3" | |
Option "TapButton3" "2" | |
Option "ClickFinger1" "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
* Quit Sublime Text 2 (so you don’t accidentally change any settings) | |
* In your Dropbox folder (usually at ~/Dropbox/), add a folder called Sublime Text 2 | |
* Open the folder with your ST2 settings (should be ~/Library/Application Support/Sublime Text 2/) | |
* Copy the following 3 folders into ~/Dropbox/Sublime Text 2/: Installed Packages, Packages, and Pristine Packages | |
* Rename the original 3 folders in ~/Library/Application Support/Sublime Text 2/ to something like Installed Packages-20110119, |
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/python | |
import fcntl | |
import optparse | |
import os | |
import progressbar | |
import re | |
import select | |
import shlex | |
import subprocess |
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
## fix "Waiting for other installations to complete." on OSX 10.6 10.7 | |
## sometimes a failed installation leaves us unable to | |
## perform an installation. The following fixes it for me | |
sudo rm /private/var/db/mds/system/mds.install.lock | |
sudo reboot |