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 DeepProxy = require('proxy-deep'); | |
const { isSymbol, isPlainObject } = require('lodash'); | |
// Empty values trigger access errors | |
const isEmptyValue = (value) => ( | |
value === undefined || | |
value === '' | |
); | |
// Check whether the value should be returned |
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
// Is this possible to do? | |
const ListComponent = ({ items, Actions }) => ( | |
<ul> | |
{items.map(item => ( | |
<li key={item.id}> | |
{item.name} <Actions item={item} /> | |
</li> | |
))} | |
</ul> |
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
pod 'React', :path => './node_modules/react-native', :subspecs => [ | |
'Core', | |
'RCTText', | |
'RCTImage', | |
'RCTNetwork', | |
'RCTWebSocket', | |
'RCTAnimation', | |
# Add any other subspecs you want to use in your project | |
] | |
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
import { | |
reduce, mergeWith, isArray, isNumber, every, | |
cond, add, ary, head, tail, concat, rest, | |
} from 'lodash/fp'; |
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
'use strict'; | |
const types = { | |
[Number ] : 'number', | |
[String ] : 'string', | |
[Boolean] : 'boolean', | |
[Object ] : 'object' | |
}; | |
function of(...typesToCheck) { |
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
def scale_on_board(scale,fretboard): | |
for string_index, string in enumerate(fretboard): | |
for fret, pitch in enumerate(string): | |
if pitch in scale: | |
fretboard[string_index][fret] += "*"; | |
return fretboard |
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
MAX_STRINGS = 6 | |
MAX_FRETS = 12 | |
def note_filter(key): | |
if key in ['C','G','D','A','E','B','F#','C#']: | |
return ['C','C#','D','D#','E','F','F#','G','G#','A','A#','B',] | |
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
MAX_STRINGS = 6 | |
MAX_FRETS = 12 | |
def note_filter(key): | |
if key in ['C','G','D','A','E','B','F#','C#']: | |
return ['C','C#','D','D#','E','F','F#','G','G#','A','A#','B',] | |
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
// Get the rendering context | |
var canvas = $("div.sandbox div.sandbox canvas")[0]; | |
var renderer = new Vex.Flow.Renderer(canvas, | |
Vex.Flow.Renderer.Backends.CANVAS); | |
var ctx = renderer.getContext(); | |
var stave = new Vex.Flow.Stave(10, 0, 500); | |
stave.setContext(ctx).draw(); |