- HTTP 形式:
git clone https://github.com/owner/git.git
- SSH 形式:
git clone git@github.com:owner/git.git
This file contains hidden or 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
| "use strict"; | |
| var coRestitution = 0.018; | |
| var coFriction = 0.01; | |
| class Particle { | |
| constructor(x, y) { | |
| this.pos = createVector(x, y); | |
| this.vel = createVector(random(-10, 10), random(-10, 10)); | |
| this.acc = createVector(0, 0); |
This file contains hidden or 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 value = nil, | |
| key = "kModelPropertiesKey", | |
| layer = context.selection[0], | |
| plugin = "com.animaapp.stc-sketch-plugin"; | |
| // Get the value | |
| context.command.valueForKey_onLayer_forPluginIdentifier(key,layer,plugin); | |
| // Set the value | |
| context.command.setValue_forKey_onLayer_forPluginIdentifier(value,key,layer,plugin); |
This file contains hidden or 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
| // [0] represents first override, replace with appropriate index if other override is desired | |
| symbolInstance.setValue_forOverridePoint("New text", symbolInstance.overridePoints()[0]); |
This file contains hidden or 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
| let threadDictionary = NSThread.mainThread().threadDictionary() | |
| let panelID = "com.betterTypePanel.panel" | |
| if (threadDictionary[panelID]) { | |
| let panel = threadDictionary[panelID] | |
| panel.close() | |
| threadDictionary.removeObjectForKey(panelID) | |
| } | |
| var panelWidth = 312 |
This file contains hidden or 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
| let notification = NSUserNotification.alloc().init() | |
| let randomNumber = Math.random() | |
| notification.setIdentifier("com.kevin.testNotification" + randomNumber) | |
| notification.setTitle("Hi there") | |
| notification.setSubtitle("What about this?") | |
| notification.setInformativeText("Your symbol") | |
| notification.setSoundName = NSUserNotificationDefaultSoundName | |
| let notificationCenter = NSUserNotificationCenter.defaultUserNotificationCenter() | |
| notificationCenter.deliverNotification(notification) |
This file contains hidden or 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
| let threadDictionary = NSThread.mainThread().threadDictionary() | |
| let panelID = "com.betterTypePanel.panel" | |
| if (threadDictionary[panelID]) { | |
| let panel = threadDictionary[panelID] | |
| panel.close() | |
| threadDictionary.removeObjectForKey(panelID) | |
| } | |
| var panelWidth = 312 |
This file contains hidden or 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
| export function runPanel() { | |
| let threadDictionary = NSThread.mainThread().threadDictionary() | |
| let identifier = "co.yourIdentifier" | |
| // If there is already a panel, prevent the plugin from running again | |
| if (threadDictionary[identifier]) return | |
| threadDictionary.panelOpen = true | |
| setupPanel(threadDictionary, identifier) | |
| } |
This file contains hidden or 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
| let previewWindow = NSApplication.sharedApplication().windows().find(window => window.title() == 'Preview') | |
| let webview = previewWindow.contentView().subviews()[1] // need to launch sketch preview in order to find the proper webview and to start up the sketch server | |
| let threadDictionary = NSThread.mainThread().threadDictionary() | |
| let panelID = "com.testPanel" | |
| if (threadDictionary[panelID]) { | |
| let panel = threadDictionary[panelID] | |
| panel.close() | |
| threadDictionary.removeObjectForKey(panelID) |
NewerOlder