Skip to content

Instantly share code, notes, and snippets.

View nickgartmann's full-sized avatar

Nick Gartmann nickgartmann

View GitHub Profile
<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>
@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>
@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 / 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
{
"name": "Tappr",
"plugins": [],
"resources": {
"user": {
"plugins": ["authentication", "social-auth"],
"attributes": {
"email": "string",
"password": "string"
},
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' );
defimpl Plug.Exception, for: Ecto.NoResultsError do
def status(_exception), do: 404
end
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;
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');
17:06:25.586 [error] #PID<0.258.0> running Spacegame.Endpoint terminated
Server: localhost:4000 (http)
Request: GET /ws
** (exit) an exception was raised:
** (ErlangError) erlang error: [reason: %Protocol.UndefinedError{description: nil, protocol: String.Chars, value: %{"thin" => "one"}}, mfa: {Phoenix.Endpoint.CowboyHandler, :websocket_handle, 3}, stacktrace: [{String.Chars, :impl_for!, 1, [file: 'lib/string/chars.ex', line: 3]}, {String.Chars, :to_string, 1, [file: 'lib/string/chars.ex', line: 17]}, {Logger, :truncate, 2, [file: 'lib/logger.ex', line: 492]}, {Logger, :log, 3, [file: 'lib/logger.ex', line: 404]}, {Spacegame.GameChannel, :event, 3, [file: 'web/channels/game.ex', line: 44]}, {Phoenix.Channel.Transport, :dispatch, 4, [file: 'lib/phoenix/channel/transport.ex', line: 102]}, {Phoenix.Channel.Transport, :dispatch, 4, [file: 'lib/phoenix/channel/transport.ex', line: 67]}, {Phoenix.Transports.WebSocket, :ws_handle, 2, [file: 'lib/phoenix/transports/websocket.ex', line: 45]}], msg: {:text, "{\"cha