Skip to content

Instantly share code, notes, and snippets.

import Cocoa
import MASShortcut
func pow() {
let rect = NSScreen.mainScreen()?.frame
let window = NSWindow(contentRect: rect!, styleMask: NSBorderlessWindowMask, backing: .Buffered, `defer`: false)
window.backgroundColor = NSColor.clearColor()
window.opaque = false
window.alphaValue = 1
window.makeKeyAndOrderFront(NSApplication.sharedApplication())
@jmont
jmont / maybe.m
Last active March 30, 2016 16:27
Swift Monads
// Swift Monads -- Maybe
// Juan C. Montemayor (@norsemelon)
// This operator can be used to chain Optional types like so:
// optionalVal >>= f1 >>= f2
// where f1 and f2 have type `Any -> Any?`
//
// If a value is ever nil, the chain short-circuits and will result in nil.
// This is a much neater way to do this than using the if syntax specified in
// the Swift iBook.
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@dtjm
dtjm / config
Created August 13, 2010 17:34
Wrapper to use OS X FileMerge when calling `svn diff`
### ~/.subversion/config
### Add this line to the [helpers] section
diff-cmd = ~/bin/svn-diffwrap.sh