Skip to content

Instantly share code, notes, and snippets.

View Airr's full-sized avatar
🎯
Focusing

Airr

🎯
Focusing
View GitHub Profile
@Airr
Airr / ST3-with-iCloud-Drive.sh
Created April 24, 2017 23:35 — forked from joeshub/ST3-with-iCloud-Drive.sh
Sync your Sublime Text 3 Settings using iCloud Drive on multiple Macs
# Notes
# Using iCloud Drive, you can sync your Sublime Text 3
# plugins and prefs so you can always have the same setup
# Prerequisites
# Make sure both machines have the latest version of OSX 10.10.x with
# Yosemite or higher and iCloud Drive turned on
# Quit ST3
@Airr
Airr / Gadget.pb
Last active December 5, 2016 00:26
Purebasic OSX Gadget Resize Demo
;
; ------------------------------------------------------------
;
; PureBasic - Gadget example file
;
; (c) Fantaisie Software
;
; ------------------------------------------------------------
;
IncludeFile "anchor.pbi"
@Airr
Airr / strings `which diskutil` | grep Usage
Created November 2, 2016 04:37
OS X Lion diskutil commands (documented and hidden)
Usage: diskutil coreStorage list
Usage: diskutil coreStorage info[rmation] [-plist]
Usage: diskutil coreStorage convert
Usage: diskutil coreStorage revert
Usage: diskutil coreStorage create lvgName
Usage: diskutil coreStorage delete lvgUUID
Usage: diskutil coreStorage addDisk lvgUUID NewMemberDeviceName
Usage: diskutil coreStorage removeDisk pvUUID
Usage: diskutil coreStorage deleteVolume lvUUID
Usage: diskutil coreStorage resizeVolume lvUUID size
@Airr
Airr / makeSwiftSoup.py
Created October 30, 2016 04:13 — forked from muxuezi/makeSwiftSoup.py
Web crawler of Swift iOS&OSX
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
# Name: The-Swift-Programming-Language
# Purpose: Web crawler of Swift, Python is slow-------
#
# Author: muxuezi@gmail.com
#
# Created: 10/27/2014
# Copyright: (c) muxuezi 2014
# Licence: <All licence>
#!/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'
@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"]
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 / 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 "${@}";
@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 / 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