Skip to content

Instantly share code, notes, and snippets.

View nickiaconis's full-sized avatar

Nick Iaconis nickiaconis

View GitHub Profile
@nickiaconis
nickiaconis / SeasonsMod.cs
Created November 10, 2019 06:00
idea for mod to change seasons in Cities: Skylines
// 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
@nickiaconis
nickiaconis / RESULTS.md
Last active February 25, 2018 06:57
Expand Properties Benchmark

$ 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)

@nickiaconis
nickiaconis / .vimrc
Created May 11, 2017 19:35
Workaround for `set backupdir=~/.vim/backup//`
" 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
@nickiaconis
nickiaconis / components.i-fail-assertion.js
Last active March 22, 2017 23:11
Reproducing assert.throws Bug
import Ember from 'ember';
export default Ember.Component.extend({
init () {
Ember.assert('This assertion always fails.', false);
}
});
@nickiaconis
nickiaconis / .A-README.md
Last active December 25, 2016 05:19
BashGitPrompt Rainbow Theme
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
queryParams: ['foo', 'bar'],
foo: null,
bar: null,
});
@nickiaconis
nickiaconis / controllers.application.js
Last active June 24, 2016 21:18
Actions Bubble Up Routes
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@nickiaconis
nickiaconis / components.aggregate-list.js
Last active June 23, 2016 20:53
Pass Argument to Closure Action
import Ember from 'ember';
import SendInviteMixin from '../mixins/send-invite';
export default Ember.Component.extend(SendInviteMixin, {
});
@nickiaconis
nickiaconis / svn-autopilot.sh
Last active December 18, 2015 11:29
For anyone with the "pleasure" of being stuck using a Subversion repository, here is a bash script full of shortcuts I've found to be useful. Let me know if you have any of your own useful svn shortcuts :)
#!/bin/bash
# This script automates some useful svn commands
# Written by Nick Iaconis >> https://github.com/codefox421
# Distributed under the Apache License, Version 2.0 >> http://www.apache.org/licenses/LICENSE-2.0
# Distributed on an AS IS basis, as outlined in the license
ME=`basename $0`
if [[ -z $1 ]]
then
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});