Skip to content

Instantly share code, notes, and snippets.

View Airr's full-sized avatar
🎯
Focusing

Airr

🎯
Focusing
View GitHub Profile
@Airr
Airr / reset.sh
Created March 29, 2013 20:02 — forked from reedobrien/reset.sh
## 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
#!/usr/bin/python
import fcntl
import optparse
import os
import progressbar
import re
import select
import shlex
import subprocess
@Airr
Airr / sublime-sync-dropbox.txt
Created March 30, 2013 05:53 — forked from ricardodantas/sublime-sync-dropbox.txt
Sync Sublime Text 2 with Dropbox
* 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,
@Airr
Airr / 10-synaptics.conf
Created March 30, 2013 05:59
Sane Synaptics Touchpad configuration. Say goodbye to jumpy, bumpy and inaccurate cursor movement. Put this in /etc/X11/xorg.conf.d/10-synaptics.conf
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"
@Airr
Airr / instructions.txt
Created March 30, 2013 06:02
Set up ssl with cheapssl and apache2 on ubuntu 12.04
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
@Airr
Airr / sort_csv.py
Last active August 29, 2015 14:17 — forked from JimHaughwout/sort_csv.py
#! /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
@Airr
Airr / cd-tests.sh
Last active August 29, 2015 14:17 — forked from markhalliwell/cd-tests.sh
#!/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 "${@}";
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()
@Airr
Airr / snippet.py
Last active September 16, 2018 17:07 — forked from gregneagle/gist:60ce73c7e267d993f1c1
macOS PyObjc Computername
import SystemConfiguration
prefs = SystemConfiguration.SCPreferencesCreate(None, "SystemConfiguration", None)
print SystemConfiguration.SCPreferencesGetValue(prefs, "System")["System"]["ComputerName"]
#!/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'