$ node index.js
status quo x 183,314 ops/sec ±7.01% (81 runs sampled)
comma fix x 88,004 ops/sec ±5.18% (81 runs sampled)
alternate fix x 88,608 ops/sec ±4.89% (84 runs sampled)
regex match fix x 36,670 ops/sec ±5.04% (83 runs sampled)
iteration fix x 175,519 ops/sec ±5.20% (84 runs sampled)
nested x 88,474 ops/sec ±3.91% (82 runs sampled)
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
// pseudo code for idea to change seasons in Cities: Skylines | |
onInterval() { | |
string loadedEnvironment = Singleton<LoadingManager>.instance.m_loadedEnvironment; | |
string simulationEnvironment = Singleton<SimulationManager>.instance.m_metaData.m_environment; | |
if (winterDateRange.contains(currentDate) && loadedEnvironment != WINTER) { | |
// Properties scene loading/unloading based on propertiesScene loading in LoadingManager#LoadLevelCoroutine | |
// not sure if unloading will break things | |
// also not sure if loading second properties scene will break things | |
// order may matter | |
// may also simply not be possible |
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
" from http://stackoverflow.com/a/38479550/2085526 | |
" === BACKUP SETTINGS === | |
" turn backup OFF | |
" Normally we would want to have it turned on. See bug and workaround below. | |
" OBS: It's a known-bug that backupdir is not supporting | |
" the correct double slash filename expansion | |
" see: https://code.google.com/p/vim/issues/detail?id=179 | |
set nobackup | |
" set a centralized backup directory |
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({ | |
init () { | |
Ember.assert('This assertion always fails.', 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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
queryParams: ['foo', 'bar'], | |
foo: null, | |
bar: 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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'; | |
import SendInviteMixin from '../mixins/send-invite'; | |
export default Ember.Component.extend(SendInviteMixin, { | |
}); |
Install Git Bash Prompt via https://github.com/magicmonty/bash-git-prompt, then add/update the files below.
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' | |
}); |
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
App.PostRoute = Ember.Route.extend({ | |
prefetch(params) { | |
return this.store.findRecord('post', params.id); | |
} | |
}); | |
App.PostCommentsRoute = Ember.Route.extend({ | |
prefetch(params, transition) { | |
return this.store.findAll('comments', transition.params.post.id); | |
}, |
NewerOlder