Utility Mac App

I’ve released my first Mac App today, Utility is a helper app to help in day to day tasks.

https://itunes.apple.com/gb/app/utility/id1027541844?mt=12

Source

https://github.com/AlexHedley/Utility-Mac

Mac – Syntax Highlighting

ACEView
https://github.com/faceleg/ACEView

Marvel API

So I found that Marvel have an API.

Marvel API
http://developer.marvel.com/
Community
http://developer.marvel.com/community
Authorization
http://developer.marvel.com/documentation/authorization

Original
https://gist.github.com/oshliaer/eb8d7197e6749475652a

I converted them to version 2 as I only have 2.7 on my machine atm

Convert from 3 to 2
https://pypi.python.org/pypi/3to2/1.1.1

3to2 -w FILENAME.py

MD5
http://www.miraclesalad.com/webtools/md5.php

The Authorisation page shows:

ts: 1

Public Key: 1234

Private Key: abcd

making: 1abcd1234

hash: ffd275c5130566a2916217b101f26150

(http://gateway.marvel.com/v1/comics?ts=1&apikey=1234&hash=ffd275c5130566a2916217b101f26150)

I created a Mac App to create the Hash and create this URL.

http://stackoverflow.com/questions/2018550/how-do-i-create-an-md5-hash-of-a-string-in-cocoa

NSTimeInterval timeStamp = [[NSDate date] timeIntervalSince1970];
// NSTimeInterval is defined as double
NSNumber *timeStampObj = [NSNumber numberWithDouble: timeStamp];
txtTimestamp.stringValue = [timeStampObj stringValue];

I call this in the app and it doesn’t work.

https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/index.html#//apple_ref/doc/constant_group/URL_Loading_System_Error_Codes

NSURLErrorUserAuthenticationRequired = -1013
NSURLErrorDomain Code=-1013

I can’t get the MD5 from Python to match the ObjC one.

I can’t get it to work with CocoaRestClient or ObjC.

Then I realise I’ve got my keys swapped, d’oh!

Multi Select TableView

Want to select more than one row in a TableView?

Mac OSX Pasteboard

Need to copy a value to the Pasteboard?

Don’t forget to clear it first.

Brand Colours

I’m working on an app and using https://fastlane.tools and using snapshot and frameit and wanted to use the annotation with keyword colours.

YouTube

https://www.youtube.com/yt/brand/en-GB/color.html

Full Colour Specifications 1 HEX: e52d27 | RGB: 229.45.39 | CMYK: 4.96.97.1

Full Colour Specifications 2 HEX: b31217 | RGB: 179.18.23 | CMYK: 20.100.100.12

Full Colour Specifications 3 HEX: 000000 | RGB: 0.0.0 | CMYK: 100.100.100.100

Facebook

http://www.color-hex.com/color-palette/185

Color Hex RGB
#3b5998 (59,89,152)
#8b9dc3 (139,157,195)
#dfe3ee (223,227,238)
#f7f7f7 (247,247,247)
#ffffff (255,255,255)

Twitter

https://about.twitter.com/company/brand-assets

Google

#4285f4

Batch renaming files

I needed to batch rename some files

brew install rename

To test run it

rename -n -e 's/-.*-/_/'  *.png

Remove the -n to perform it

rename -e 's/-.*-/_/'  *.png

I wanted to remove the following -portrait

rename -d -portrait *

Thanks to

http://stackoverflow.com/questions/24102974/mac-os-x-terminal-batch-rename

http://superuser.com/questions/398709/mass-remove-file-prefix-on-a-mac

Follow

Get every new post delivered to your Inbox.