This file contains 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
turn off auto conversion | |
defaults write com.pixelmatorteam.pixelmator alwaysUseNativeFormat -bool no | |
turn off auto save | |
defaults write com.pixelmatorteam.pixelmator disableAutosave -bool yes |
This file contains 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/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g' |
This file contains 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
#!/bin/bash | |
# based on https://gist.github.com/jonah-williams/949831 | |
# keychain unlock for codesign: | |
# security unlock-keychain "$HOME/Library/Keychains/login.keychain" | |
# this script assumes that you have signing and provisioning configured in project's plist | |
# use -m "message" to set AppBlade build description as attribute |
This file contains 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
// Thanks to http://www.labs.saachitech.com/2012/10/23/pdf-generation-using-uiprintpagerenderer | |
// Note: including images in the HTML won't work, see here: | |
// https://github.com/nyg/HTMLWithImagesToPDF | |
import UIKit | |
// 1. Create a print formatter | |
let html = "<b>Hello <i>World!</i></b>" | |
let fmt = UIMarkupTextPrintFormatter(markupText: html) |
Ref: https://gist.github.com/vertexclique/9839383
Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).
Common step after enter run the patch command:
- After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
This file contains 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
.highlight { background: #181818; padding: 16px; overflow: auto; line-height: 1.2; border-radius: 0.2em } | |
.highlight pre { margin: 0} | |
.highlight code { color: #F8F8F8; font-family: "Source Code Pro", Menlo, monospace; font-size: 70% } | |
.highlight .hll { background-color: #ffffcc } | |
.highlight .c { color: #5F5A60; font-style: italic } /* Comment */ | |
.highlight .err { border:#B22518; } /* Error */ | |
.highlight .k { color: #CDA869 } /* Keyword */ | |
.highlight .cm { color: #5F5A60; font-style: italic } /* Comment.Multiline */ | |
.highlight .cp { color: #5F5A60 } /* Comment.Preproc */ | |
.highlight .c1 { color: #5F5A60; font-style: italic } /* Comment.Single */ |
This file contains 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
<?php | |
/** | |
* @param $http2ch the curl connection | |
* @param $http2_server the Apple server url | |
* @param $apple_cert the path to the certificate | |
* @param $app_bundle_id the app bundle id | |
* @param $message the payload to send (JSON) | |
* @param $token the token of the device | |
* @return mixed the status code (see https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/APNsProviderAPI.html#//apple_ref/doc/uid/TP40008194-CH101-SW18) |
This file contains 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
// MARK: - progress bar with file dealing process | |
private var counter:Int = 0 | |
func process() { | |
// get total | |
// prepare alert | |
let screenFrame = NSScreen.main()!.frame | |
let window = NSWindow(contentRect: NSMakeRect(screenFrame.width / 2 - 140, screenFrame.height * 0.66 + 50, 280, 20), | |
styleMask: NSBorderlessWindowMask, |
OlderNewer