Skip to content

Instantly share code, notes, and snippets.

View ecowden's full-sized avatar

Evan Cowden ecowden

View GitHub Profile
@ecowden
ecowden / bouncing-checklist.md
Created April 29, 2015 16:55
Bouncing Checklist

Bouncing Checklist

  • Name Tracks
  • Separate Drums to separate tracks
  • Isolate noise. Create noise regions if necessary. (Probably acoustic guitars.)
  • Raw Vox? Guitars? Duplicate tracks as necessary.
  • Bass
    • Group MIDI into single region
    • Bounce MIDI file
  • Panning
@ecowden
ecowden / importing-checklist.md
Last active August 29, 2015 14:20
Importing Checklist

Importing Checklist

  • New project
  • Import audio
  • Hide & deactivate "raw" tracks until needed
  • Spread output channels to correct I/O
  • Reset Pan to match labels
  • Trim gain to match labels on tracks
  • Fix names (remove the _bip that logic adds to the end of each)
  • Add colors for logical groupings (drums, bass, rhy, lead, keys, vox, etc.)
@ecowden
ecowden / kore-5th-unhandled-exception.txt
Created July 31, 2015 02:19
Unhandled exception when I attempt to update Kore 5th firmware
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IO.IOException: No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept.
at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)
at System.IO.Ports.SerialPort.Open()
at Pacific_Sun.Form1.connect()
@ecowden
ecowden / angular-ng-show
Created January 11, 2013 16:35
Use the ng-show directive to hide partially populated sections of a page while loading
<!-- $scope.recentTimesheets is set from an Angular $resource call.
It's value will be an empty array (or object) until the call returns from the server.
The repeater will be blank until it returns, but the <h3>RecentTimecards will show up unless we do something.
The effect is a rather ungainly page that loads in little sections. Using ng-show, we can clean it
up and make sure that everything loads together.
-->
<div ng-show="recentTimesheets.length > 0">
<h3>Recent Timecards</h3>
<ul class="nav nav-tabs nav-stacked">
<li ng-repeat="recentTimesheet in recentTimesheets">
@ecowden
ecowden / angular-scope-$watch
Created January 16, 2013 20:33
Use the Angular scope.$watch function to observe changes to a scope variable
/*
* Observe the "recentTimesheets" scope variable and calculate a derived value when
* it changes.
*
* The last parameter (true, in this case) instructs the watch to use object equality.
* If we set this to false or omitted it, the watch expression would use reference
* equality instead. This can make a huge difference! For instance, if you are using
* an Angular $resource to set the watched variable, the $resource.xxx() methods
* return an empty object immediately, then populate it when the XHR returns.
*
@ecowden
ecowden / angular-font-awesome-busy
Created January 17, 2013 23:02
Create busy indicators with Angular and FontAwesome
/*
* Let's say we have a $resource and we want to do some things with it that take time.
* Say, saving and submitting - and we have a button for each. When the user clicks either
* button, we want to disable both and change the icon of the clicked one to a spinning busy icon.
*
* We'll use a 'isBusy' flag to drive when buttons are disabled, and isSaving and isSubmitting
* for each individual action. Then the ng-class directive gives us an easy way to swap
* Font Awesome icon classes.
*
* Note that you can add the 'icon-spin' class to any Font Awesome (v3.0) icon to make it spin.
@ecowden
ecowden / sugarjs-mondays
Created January 18, 2013 21:19
User the SugarJS date functions to find Mondays
/*
* SugarJS is a super handy tool for common JavaScript functions.
*
* Recently, we needed to find Mondays. This Monday, next Monday, three Mondays ago...Mondays
* for everyone! SugarJS made this kind of logic dead simple. Here is one way to
* tackle the problem.
*/
var thisMonday = Date.create().beginningOfWeek().addDays(1);
var eightMondaysAgo = Date.create().rewind({days: 7 * 8}).beginningOfWeek().addDays(1);
@ecowden
ecowden / bootstrap-add-on
Created January 23, 2013 21:27
Use Bootstrap .add-on styles to associate an icon with an input element
<!--
If pictures are worth a thousand words, here's a spiffy way to associate
icons with your input elements.
Use it. It's pretty.
For detailed examples and images, see:
http://twitter.github.com/bootstrap/base-css.html#forms
-->
@ecowden
ecowden / grails-cache-headers
Last active December 11, 2015 20:38
Configure cache headers for Grails controllers
/*
* Setting cache headers appropriately is both a performance issue and is necessary
* to avoid a slew of bugs from when files or data change over time.
*
* For this example, I'm using the Grails cache-headers plugin:
* http://grails.org/plugin/cache-headers
*/
/*
* First, we've designated two cache categories in the Config.groovy. This lets us centralize configuration
@ecowden
ecowden / angular-route-match
Last active December 12, 2015 09:58
In Angular, match the current route to set the active element in a navigation bar, etc.
/*
* In your controller, create a function that compares the current location to a regular expression.
*/
$scope.routeMatches = function (fragment) {
var matcher = new RegExp('^' + fragment + '$', ['i']);
return matcher.test($location.path());
};
/*
* In your partial, use the above function to assign an appropriate 'active' CSS class.