Skip to content

Instantly share code, notes, and snippets.

Sanjay sfsam

Block or report user

Report or block sfsam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View AppDelegate.swift
// Regarding http://indiestack.com/2017/06/evergreen-images/
// Could evergreenImage() be rewritten like this?
private func evergreenImage() -> NSImage {
let imageSize = NSSize(width: 64, height: 64)
let image = NSImage.init(size: imageSize, flipped: false) { (rect) -> Bool in
let fontAttributes = [NSFontAttributeName: NSFont.systemFont(ofSize: 60)]
NSString(string: "🌲").draw(in: rect, withAttributes: fontAttributes)
return true
}
@sfsam
sfsam / MOWTextField.h
Created Mar 21, 2013
MOWTextField is an NSTextField subclass which lets you specify an alternate short string. The short string will be used if the frame is too short for the normal string value.
View MOWTextField.h
//
// MOWTextField.h
//
//
// Created by Sanjay Madan on 03/21/13.
// Copyright (c) 2013 mowglii.com. All rights reserved.
//
#import <Cocoa/Cocoa.h>
You can’t perform that action at this time.