This is a SCRIPT-8 cassette.
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
// --- bus setup | |
var miniBus = function (n) { | |
var o; | |
o = function (i) { | |
var t; | |
t = i.toLowerCase(); | |
return n[t] || (n[t] = []); | |
}; | |
n = n || {}; | |
return { |
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
// from https://github.com/yellowdoge/canvas-recorder/blob/master/capturer.js | |
var canvases = document.querySelectorAll(".drawingArea"); | |
console.log("# canvases " + canvases.length); | |
var theCanvas = canvases[0]; | |
var theStream = theCanvas.captureStream(); | |
var theRecorder; | |
var recordedChunks = []; |
This is a SCRIPT-8 cassette.
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
import json | |
class Toot(object): | |
def __init__(self, id, author_id, parent_id, text): | |
super(Toot, self).__init__() | |
self.id = id | |
self.author_id = author_id | |
self.parent_id = parent_id | |
self.text = text | |
self._children = [] |
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
[...document.querySelectorAll('code')] | |
.filter(div => div.innerHTML.includes('°F')) | |
.forEach(function(div){div.innerHTML=Math.round((div.innerHTML.split("°F")[0]-32)*5/9)+"°C"}) |
what: save clipboard PNG or TIFF images to current Finder window
steps:
- Automator | New Quick Action
- drag from Utilities Run Javascript
- paste content from clipboard2file.js inside run function
tips:
- clipboard2file.js can be run independently in Script Editor
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
// swiftc -o dotgrid dotgrid.swift -target x86_64-apple-macosx10.12 | |
// strip -x dotgrid | |
import Cocoa | |
import WebKit | |
class WindowController: NSWindowController { | |
} | |
class AppDelegate: NSObject { |
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
> mkdir choo | |
> cd choo | |
> npm install --save-dev bankai | |
> touch package.json | |
* add to package.json | |
{ | |
"name": "my-project", | |
"scripts": { | |
"start": "bankai start", |
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
license: mit |
NewerOlder