This file contains hidden or 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
#!/usr/bin/env node | |
var convert = require('color-convert'); | |
var OPC = new require('../fadecandy/examples/node/opc') | |
var client = new OPC('localhost', 7890); | |
// This is set in the CAVA config file | |
const bars = 100; | |
const frame = []; |
This file contains hidden or 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
// A minimal set of NodeJS code for parsing incoming ASCII data from CAVA and turning it into useful data. | |
// This code would need to have cava's output piped to it: | |
// Ex: $ cava -p ~/.config/cava/raw | node cava_ascii_output_parser.js | |
process.stdin.setEncoding('utf8'); | |
let str = ''; | |
process.stdin.on('readable', () => { | |
let chunk; | |
This file contains hidden or 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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Run Code to run it on the right | |
var mongoose = require('mongoose'); | |
var _ = require('lodash'); | |
// Set up a Schema with some required elements, and a field with an array | |
var ThingSchema = new mongoose.Schema({ | |
name: { | |
type: String, | |
required: true |
This file contains hidden or 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
" _ | |
" ___ __ _ __ _| | ___ | |
" / _ \/ _` |/ _` | |/ _ \ | |
"| __/ (_| | (_| | | __/ | |
" \___|\__,_|\__, |_|\___| | |
" |___/ | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => General | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
This file contains hidden or 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
/** | |
* Build a group of targets based on a prefix | |
* | |
* Ex: grunt build:less:debug | |
* | |
* This would run all less targets that begin with "debug_": | |
* debug_web | |
* debug_sidebar | |
* debug_self_help | |
* debug_self_help_theme |
This file contains hidden or 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
// Totally intolerable | |
var express = require('express') | |
, routes = require('./routes') | |
, http = require('http'); | |
// Better | |
var express = require('express'), | |
routes = require('./routes'), | |
http = require('http'); | |
This file contains hidden or 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
================================================================================ | |
Error executing action `start` on resource 'service[postfix]' | |
================================================================================ | |
Mixlib::ShellOut::ShellCommandFailed | |
------------------------------------ | |
Expected process to exit with [0], but received '1' | |
---- Begin output of /sbin/service postfix start ---- | |
STDOUT: Starting postfix: [FAILED] |
This file contains hidden or 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
================================================================================ | |
Error executing action `upgrade` on resource 'yum_package[php-mysql]' | |
================================================================================ | |
Chef::Exceptions::Exec | |
---------------------- | |
returned 1, expected 0 | |
This file contains hidden or 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
<h2><a class="title" href="{{ post.url }}"> | |
{% assign titleWords = post.title | split: %} | |
{% for word in titleWords %}{% if forloop.last %} {% else %} {% endif %}{{ word }}{% endfor %} | |
</a></h2> |
This file contains hidden or 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
define([], function () { | |
var Wiser = window.Wiser || {}; | |
if (typeof Wiser === 'object') { | |
Wiser.utils = Wiser.utils || {}; | |
if (typeof Wiser.utils === 'object') { | |
/* WiserTogether Utility Functions | |
* | |
*/ |
NewerOlder