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
document.body.textContent.split('\n').reduce(([best, curr], line) => line ? [best, curr + 1 * line] : [Math.max(best, curr), 0], [0,0])[0] | |
document.body.textContent.split('\n').reduce(([totals, curr], line) => line ? [totals, curr + 1 * line] : [[...totals, curr], 0], [[],0])[0].sort((a, b) => b - a).slice(0, 3).reduce((x, y) => x + y) | |
document.body.textContent.trim().split('\n').map(line => line.split(' ').map(choice => ['A', 'B', 'C', 'X', 'Y', 'Z'].indexOf(choice) % 3)).map(([them, me]) => me + 1 + [3, 6, 0][(3 + me - them) % 3]).reduce((a, b) => a + b) | |
document.body.textContent.trim().split('\n').map(line => line.split(' ').map(choice => ['A', 'B', 'C', 'X', 'Y', 'Z'].indexOf(choice) % 3)).map(([them, result]) => [(2 + them + result) % 3, result]).map(([me, result]) => me + 1 + [0, 3, 6][result]).reduce((a, b) => a + b) | |
document.body.textContent.trim().split('\n').flatMap(line => line.split('').filter((item, i) => i < line.length / 2 && !line.slice(0, i).includes(item) && line.slice(line.length / 2).inclu |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
actions: { | |
bar() { | |
alert('hello from my-component'); | |
} | |
} | |
}); |
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
/* | |
A script that outputs a list of the top choices for each package | |
*/ | |
const User = require('../models/schemas/user'); | |
const Package = require('../models/schemas/package'); | |
const Session = require('../models/schemas/session'); | |
const User_Helpers = require('../controllers/users'); | |
const Package_Helpers = require('../controllers/packages'); |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: '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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
actions: { | |
sendError() { | |
this.send('error', new Error('error')); | |
} | |
} |
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
{ | |
"summary": { | |
"buildCount": 0, | |
"output": "/Users/cbnz/Projects/otbs/portal/portal-main/tmp/broccoli_merge_trees-output_path-2TuTjl7i.tmp", | |
"totalNodes": 2952 | |
}, | |
"nodes": [ | |
{ | |
"_id": 2, | |
"id": { |
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
~/Projects/otbs/portal/portal-main $ ./perf-test.sh | |
rm: tmp: No such file or directory | |
rm: /var/folders/fz/lzgs8qw5287fl_829v9vdgs80000gn/T//if-you-need-to-delete-this-open-an-issue-async-disk-cache/: No such file or directory | |
- console-ui@1.0.3 node_modules/console-ui | |
- fs-extra@0.30.0 node_modules/ember-cli/node_modules/broccoli-concat/node_modules/fs-extra | |
- exists-sync@0.0.4 node_modules/ember-cli/node_modules/exists-sync | |
- fs-extra@1.0.0 node_modules/ember-cli/node_modules/fs-extra | |
- uuid@3.0.1 node_modules/ember-cli/node_modules/uuid | |
portal@2.0.0 /Users/cbnz/Projects/otbs/portal/portal-main | |
└─┬ ember-cli@2.10.1 |
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 fix-ec-dev-deps { | |
cd node_modules/ember-cli | |
npm i | |
cd ../.. | |
} | |
function clear-cache { | |
rm -r tmp $TMPDIR/if-you-need-to-delete-this-open-an-issue-async-disk-cache/ | |
} |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
data: [ | |
{ toggle: true, nested: { toggle: true } }, | |
{ toggle: true, nested: { toggle: true } }, | |
{ toggle: false, nested: { toggle: false } } | |
], |
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 OtherController from './other'; | |
export default OtherController.extend({ | |
appName: 'Ember Twiddle' | |
}); |
NewerOlder