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
0x53ae257805Bf48B892048a7c24C909a6E9A3B881 |
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
// Photoshop script that generates app icons for iMessage apps and sticker packs | |
// to use in iOS 10 and Xcode 8. | |
// | |
// This script accepts any image ratio and outputs to many aspect ratios. The | |
// default background color is white. | |
// | |
// WARNING!!! In the rare case that there are name collisions, this script will | |
// overwrite (delete perminently) files in the same folder in which the selected | |
// iTunesArtwork file is located. Therefore, to be safe, before running the | |
// script, it's best to make sure the selected iTuensArtwork file is the only |
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
var sharedContainerURL = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier("group.com.company.project")!.URLByAppendingPathComponent("DB.plist") | |
func retrieve() -> AnyObject? { | |
if let data = NSData(contentsOfURL: sharedContainerURL) { | |
if let unarchived: AnyObject = NSKeyedUnarchiver.unarchiveObjectWithData(data) { | |
return unarchived | |
} | |
} | |
return nil | |
} |
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
// | |
// GradientGenerator.swift | |
// WatchSimulator | |
// | |
// Created by Ben Morrow on 10/12/14. | |
// | |
// The most up-to-date version of this file is hosted at https://gist.github.com/benmorrow/aa3484dd3128875afbc0 | |
// | |
import UIKit |
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
Template.item.preserve({ | |
'.draggable': function (node) { return node.id; } | |
}); |
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
Template.item.rendered = function () { | |
var item = Items.findOne(this.data._id); | |
var item_left = item.left; | |
var item_top = item.top; | |
$(this.find('.draggable')).draggable({ | |
cursor: 'move', stop: | |
function () { | |
var self = $(this); | |
Items.update(this._id, {$set: {top: self.css('top'), left: self.css('left')}}); | |
} |