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 find from "lodash/find"; | |
import get from "lodash/get"; | |
import isEmpty from "lodash/isEmpty"; | |
import api from "utils/api"; | |
import { createSelector } from "reselect"; | |
import { | |
actionTypesFor, | |
actionCreatorsFor, | |
selectorsFor, |
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
{ | |
"data_schema": { | |
"group": "", | |
"name": "String", | |
"title": "String", | |
"description": "String datatype inherited from Generic datatypes", | |
"type": "datatype.string", | |
"base_type": "datatype", | |
"inherits": "generic.datatype", | |
"version": "1.0.0", |
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
function findTableIds(properties) { | |
const ids = map(properties, (property, key) => { | |
if (get(property, 'lhv_table')) { | |
return key; | |
} | |
else if (key === 'input') { | |
return findTableIds(get(property, 'properties')); | |
} | |
}); |
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 response = { | |
title: 'Genesis 1:2-3', // what is x-gen? | |
verses: [ | |
{ // first verse (we'll loop through if there are many) | |
osisID: 'Gen.1.2', | |
words: [ | |
{ // words not within <w> are converted to this | |
$: 'The' // $ is always a string value | |
}, | |
{ |
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
// modified version of: http://philipwalton.com/articles/how-to-unit-test-private-functions-in-javascript/ | |
// uses grunt-strip-code npm package during build | |
var myModule = (function() { | |
var api = { | |
bar: bar | |
}; | |
var _bar = 'bar'; | |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<h3>Closer to a real use case</h3> | |
<div id="some-module"> | |
<p class="disabled">I should be green</p> | |
<p class="sometimes-special">sometimes special, but parent says no :-(</p> | |
<p class="never-special">never special</p> | |
<directive xx-picky> | |
<p class="disabled">I want to be red, but I can't</p> | |
</directive> |
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
// currently | |
function update(id, deployment, local) { | |
var deferred = $q.defer(), | |
d = $q.defer(); | |
if (!local) { | |
$http.patch('/api/deployments/' + id, deployment).success(function (data) { | |
if (_.isObject(data)) { | |
d.resolve(deployment); | |
} else { |
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
Running "shell:mongo" (shell) task | |
2014-12-31T12:35:41.840-0800 [initandlisten] MongoDB starting : pid=50263 port=27017 dbpath=db 64-bit host=YASSYED-M-95M2 | |
2014-12-31T12:35:41.840-0800 [initandlisten] | |
2014-12-31T12:35:41.840-0800 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000 | |
2014-12-31T12:35:41.840-0800 [initandlisten] db version v2.6.6 | |
2014-12-31T12:35:41.840-0800 [initandlisten] git version: nogitversion | |
2014-12-31T12:35:41.840-0800 [initandlisten] build info: Darwin minimavericks.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49 | |
2014-12-31T12:35:41.841-0800 [initandlisten] allocator: tcmalloc | |
2014-12-31T12:35:41.841-0800 [initandlisten] options: { storage: { dbPath: "db" } } | |
2014-12-31T12:35:41.841-0800 [initandlisten] journal dir=db/journal |
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
[{letter:'a'},{letter:'b'},{letter:'c'},{letter:'d'},{letter:'e'},{letter:'f'},{letter:'g'},{letter:'h'},{letter:'i'},{letter:'j'},{letter:'k'},{letter:'l'},{letter:'m'},{letter:'n'},{letter:'o'},{letter:'p'},{letter:'q'},{letter:'r'},{letter:'s'},{letter:'t'},{letter:'u'},{letter:'v'},{letter:'w'},{letter:'x'},{letter:'y'},{letter:'z'}] |
NewerOlder