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.
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 https = require('https'); | |
| import * as Constants from './constants'; | |
| import * as qs from 'qs'; | |
| export class SlackBot { | |
| options = { | |
| token: '', | |
| channel: '', | |
| username: '', | |
| icon_url: '' |
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
| /** | |
| * 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 | |
| */ |
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
| // 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 |
-
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
brewinstalled (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
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
| /** | |
| @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) { |
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 | |
| # 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""" | |
NewerOlder