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
~/Developer/ML/js-ecosystem/modules/test-pythonjs (master #) $ yarn add python.js | |
yarn add v1.15.2 | |
info No lockfile found. | |
[1/4] 🔍 Resolving packages... | |
[2/4] 🚚 Fetching packages... | |
[3/4] 🔗 Linking dependencies... | |
[4/4] 🔨 Building fresh packages... | |
error /Users/andrew/Developer/ML/js-ecosystem/modules/test-pythonjs/node_modules/python.js: Command failed. | |
Exit code: 1 | |
Command: node-gyp rebuild |
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
Unpacking OpenEXR-2.3.0 | |
-- The C compiler identification is GNU 7.2.1 | |
-- The CXX compiler identification is GNU 4.8.5 | |
-- Check for working C compiler: /usr/bin/cc | |
-- Check for working C compiler: /usr/bin/cc -- works | |
-- Detecting C compiler ABI info | |
-- Detecting C compiler ABI info - done | |
-- Detecting C compile features | |
-- Detecting C compile features - done | |
-- Check for working CXX compiler: /usr/bin/c++ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
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
Error: node_modules/apollo-client/node_modules/graphql-tag/node_modules/graphql/type/definition.js.flow:108 | |
108: GraphQLList<GraphQLOutputType> | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ GraphQLList. This type is incompatible with | |
1196: export class GraphQLNonNull<T: GraphQLNullableType> { | |
^^^^^^^^^^^^^^^^^^^ union: GraphQLScalarType | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType | GraphQLInputObjectType | type application of class `GraphQLList` | |
Member 1: | |
203: GraphQLScalarType | | |
^^^^^^^^^^^^^^^^^ GraphQLScalarType | |
Error: | |
108: GraphQLList<GraphQLOutputType> |
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
const MyClass = new ObjCClass({ | |
classname: 'MyClass', | |
superclass: NSButton, | |
_private: 'initial', | |
init() { | |
log("my custom init code. no need to call super here "); | |
this._private = 'test'; | |
}, |
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
// Recursively create a struct | |
function makeStruct(def) { | |
if (typeof def !== 'object') { | |
return def; | |
} | |
const name = Object.keys(def)[0]; | |
const values = def[name]; | |
const structure = MOStruct.structureWithName_memberNames_runtime(name, Object.keys(values), null); |
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
// Copy-paste this into 💎Sketch.app and run it 🔥 | |
// Scroll to bottom for usage | |
// Use any C function, not just ones with BridgeSupport | |
function CFunc(name, args, retVal) { | |
// Due to particularities of the JS bridge, we can't call into MOBridgeSupport objects directly | |
// But, we can ask key value coding to do the dirty work for us ;) | |
function setKeys(o, d) { | |
const funcDict = NSMutableDictionary.dictionary() | |
funcDict.o = o |
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
const colorList = { | |
Haus: '#F3F4F4', | |
Night: '#333', | |
Sur: '#96DBE4', | |
'Sur Dark': '#24828F', | |
Peach: '#EFADA0', | |
'Peach Dark': '#E37059', | |
Pear: '#93DAAB', | |
'Pear Dark': '#2E854B', | |
}; |
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
// Make a class with some handlers. | |
function Class(handlers){ | |
var uniqueClassName = "fetchDelegate_" + NSUUID.UUID().UUIDString(); | |
var cls = MOClassDescription.allocateDescriptionForClassWithName_superclass_(uniqueClassName, NSObject); | |
// Add each handler to the class description | |
for(var selectorString in handlers) { | |
var sel = NSSelectorFromString(selectorString); | |
cls.addInstanceMethodWithSelector_function_(sel, handlers[selectorString]); | |
} | |
// Add ivar to store instance-specific info |
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
- (void)_setValue:(CGFloat)value forAnimatedKey:(NSString *)animationKey | |
{ | |
POPSpringAnimation *ps = [self pop_animationForKey:animationKey]; | |
if (!ps) { | |
ps = [POPSpringAnimation animation]; | |
ps.property = [POPAnimatableProperty propertyWithName:animationKey initializer:^(POPMutableAnimatableProperty *prop) { | |
prop.readBlock = ^(DEViewerView *view, CGFloat *vs) { | |
vs[0] = [[view valueForKey:animationKey] floatValue]; | |
}; | |
prop.writeBlock = ^(DEViewerView *view, const CGFloat *vs) { |