Skip to content

Instantly share code, notes, and snippets.

View nickgartmann's full-sized avatar

Nick Gartmann nickgartmann

View GitHub Profile
var fs = require( 'fs' ),
Encoder = require( 'node-html-encoder' ).Encoder,
MachineGroupService = require( '../../core/services/MachineGroupService.js' ),
ApplicationService = require( '../../core/services/ApplicationService.js' ),
path = require( 'path' ),
walk = require('../utilities/DirectoryWalker.js'),
ApplicationService = require( '../../core/services/ApplicationService.js' ),
appService = new ApplicationService(),
uaParser = require('ua-parser');
setPlaylist: function( tracks, icd_id, callback ) {
//use track to find album and track number
//all tracks on album with higher track number than
//this should be added to `media_playlist` table
//( maybe clear `media_playlist` out first? )
// console.log( 'AudioRepository.setPlaylist(): not yet implemented!!' );
var q = squel.delete().from( 'media_playlist' ).where("ecms_id=" + icd_id);
this._delete( q.toString(), function( result ) {
var i = 0;
defimpl Plug.Exception, for: Ecto.NoResultsError do
def status(_exception), do: 404
end
App.Views.Qii = App.Views.BaseWidget.extend({
tagName: 'div',
className: 'Widget GreyFrame LightWidget',
template: window.Templates.Qii,
bindMod: function() {
this.onoffmod = new window.Modules.OnOff( '#' + this.$el.attr( 'id' ) + ' div.OnOffMod' );
this.slider = new window.Modules.Slider( '#' + this.$el.attr( 'id' ) + ' div.GreyScaleMod' );
this.qii = new window.Modules.Light( '#' + this.$el.attr( 'id' ) + ' div.LightMod' );
{
"name": "Tappr",
"plugins": [],
"resources": {
"user": {
"plugins": ["authentication", "social-auth"],
"attributes": {
"email": "string",
"password": "string"
},
@nickgartmann
nickgartmann / boot2docker-shellinit.sh
Created May 28, 2015 21:34
Put this in your .bashrc or .zshrc to auto-initialize boot2docker for new shells (while boot2docker is up)
if [ "$(boot2docker status)" = 'running' ]; then
$(boot2docker shellinit 2&>1) > /dev/null
fi
@nickgartmann
nickgartmann / gui.html
Last active August 29, 2015 14:26
DSL for Scene buttons for the econnect v2
<page title="Scenes" icon="/img/scene-navigation.png">
<scene-button scene="4">Diamond</scene-button>
<scene-button scene="5">Crystal</scene-button>
</page>
@nickgartmann
nickgartmann / gui.html
Created July 28, 2015 20:54
Example DSL for the page widget for the eConnect v2 project. Note, this does not require a navbar to work. When the current URL path matches the given path, we display the page.
<page title="Home" default><!-- put slideshow widget here --></page>
<page title="Movies" path="/movies"><!-- movie list widget goes here --></page>
<page title="Music" path="/music"><!-- album list widget goes here --></page>
<page title="Player" path="/media-player"><!-- media player goes here --></page>
<on-off id="1" default="off" />
<on-off id="2" default="on" />
<div class="quasar">
<row>
<column width="6">
<h2 class="title">Wash</h2>
<on-off id="3" />
</column>
<column width="6"><intensity-slider id="3" default="0" /></column>
<navbar>
<nav-item icon="img/home.png" url="/home" />
<nav-item url="/media>
<img src="img/media.png" />
<h2>Media</h2>
</nav-item>
</navbar>