-
Go to https://developer.apple.com/downloads/index.action and search for "Command line tools" and choose the one for your Mac OSX
-
Go to http://brew.sh/ and enter the one-liner into the Terminal, you now have
brew
installed (a better Mac ports) -
Install transmission-daemon with
brew install transmission
-
Copy the startup config for launchctl with
ln -sfv /usr/local/opt/transmission/*.plist ~/Library/LaunchAgents
#!/usr/bin/env python | |
# encoding: utf-8 | |
"""emlx.py | |
Class to parse email stored with Apple proprietary emlx format | |
Created by Karl Dubost on 2013-03-30 | |
Inspired by Rui Carmo — https://the.taoofmac.com/space/blog/2008/03/03/2211 | |
MIT License""" | |
/** | |
@brief Returns true if images have same meta. Width, Height, bit depth. | |
@discussion Assumes images are non null. | |
*/ | |
func doImagesHaveSameMeta(#image1:CGImage, #image2:CGImage) -> Bool { | |
if CGImageGetWidth(image1) != CGImageGetWidth(image2) { | |
return false | |
} | |
if CGImageGetHeight(image1) != CGImageGetHeight(image2) { |
// NSScanner+Swift.swift | |
// A set of Swift-idiomatic methods for NSScanner | |
// | |
// (c) 2015 Nate Cook, licensed under the MIT license | |
import Foundation | |
extension NSScanner { | |
// MARK: Strings |
/** | |
* Demonstrates how to use Apple's CloudKit server-to-server authentication | |
* | |
* Create private key with: `openssl ecparam -name prime256v1 -genkey -noout -out eckey.pem` | |
* Generate the public key to register at the CloudKit dashboard: `openssl ec -in eckey.pem -pubout` | |
* | |
* @see https://developer.apple.com/library/prerelease/ios/documentation/DataManagement/Conceptual/CloutKitWebServicesReference/SettingUpWebServices/SettingUpWebServices.html#//apple_ref/doc/uid/TP40015240-CH24-SW6 | |
* | |
* @author @spllr | |
*/ |
import https = require('https'); | |
import * as Constants from './constants'; | |
import * as qs from 'qs'; | |
export class SlackBot { | |
options = { | |
token: '', | |
channel: '', | |
username: '', | |
icon_url: '' |
This is a collection of basic "recipes", many using twurl (the Swiss Army Knife for the Twitter API!) and jq to query the Twitter API and format the results. Also, some scripts to test or automate common actions.
// Created by Matthew Johnson on 5/28/16. | |
// Copyright © 2016 Anandabits LLC. All rights reserved. | |
// | |
// This is a minimalist implementation of a responder chain in pure Swift. | |
// | |
// It is not intended to demonstrate the best way to | |
// implement event processing in Swift. | |
// | |
// The intent is to show how little code is necessary to acheive behavior | |
// similar to Cocoa's responder chain in pure Swift. |
Use it at your own risk! You might end up worse than before. Backup everything beforehand. Twice.
If you have the Messages app setup in multiple Macs with the same Apple ID you may end up with iMessages (or SMS) scattered around all of these Macs. This is because after a certain time the new iMessages (or SMS) recevied will cease to push to devices afer a certain time has elapsed. Thus, if a computer has been offline for some period of time it won't get the new iMessages.
Each Messages instance stores the information in a SQLite database, to consolidate all these databases run the script below. This is where the Messages app stores the SQLite database under ~/Library/Messages
, the folder contents will look like as follows:
- chat.db