Skip to content

Instantly share code, notes, and snippets.

View ekryski's full-sized avatar

Eric Kryski ekryski

View GitHub Profile
var AppConstants = require('../constants/constants');
var AppDispatcher = require('../dispatchers/app');
var Connections = require('../api/connection');
var ConnectionActions = {
loadConnections: function() {
Connections.find({}, function(error, connections){
if (error) {
AppDispatcher.handleViewAction({
action: AppConstants.LOAD_CONNECTIONS_FAIL,
@ekryski
ekryski / output
Created November 16, 2013 16:00
Error output for `brew install mapnik --verbose`
eric : examples $ brew install mapnik --verbose
==> Downloading http://mapnik.s3.amazonaws.com/dist/v2.2.0/mapnik-v2.2.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/mapnik-2.2.0.tar.bz2
tar xf /Library/Caches/Homebrew/mapnik-2.2.0.tar.bz2
brew: PYTHONPATH=/usr/local/lib/python2.7/site-packages:/usr/local/Cellar/mapnik/2.2.0/lib/python2.7/site-packages:/usr/local/Cellar/mapnik/2.2.0/libexec/lib/python2.7/site-packages
==> /usr/bin/python scons/scons.py configure CC="clang" CXX="clang++" JOBS=4 PREFIX=/usr/local/Cellar/mapnik/2.2.0 ICU_INCLUDES=/usr/local/opt/icu4c/include ICU_LIBS=/usr/local/opt/icu4c/lib PYTHON_PREFIX=/usr/local/Cellar/mapnik/2.2.0 JPEG_INCLUDES=/usr/local/opt/jpeg/include JPEG_LIBS=/usr/local/opt/jpeg/lib TIFF_INCLUDES=/usr/local/opt/libtiff/include TIFF_LIBS=/usr/local/opt/libtiff/lib BOOST_INCLUDES=/usr/local/opt/boost/include BOOST_LIBS=/usr/local/opt/boost/lib PROJ_INCLUDES=/usr/local/opt/proj/include PROJ_LIBS=/usr/local/opt/proj/lib CAIRO=False
scons: Reading SConscript files
@ekryski
ekryski / config.js
Last active July 25, 2018 09:13
Testing code client side with Mocha + Chai + RequireJS (to keep it clean)
require.config({
shim: {
'underscore': {
exports: '_'
},
'less': {
exports: 'LESS'
}
'mocha': {
exports: 'mocha'
@ekryski
ekryski / app.js
Last active December 11, 2015 11:48
Express Error Handler
app.configure( 'development', function () {
app.use( express.logger( {format: 'dev'} ) );
app.use( express.static( __dirname + '/public' ) );
app.use( errorHandler( { dumpExceptions: true, showStack: true } ) );
} );
@ekryski
ekryski / index.html
Created November 1, 2012 22:03
Full Bodied Sticky Footer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Full Bodied Sticky Footer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<style type="text/css">
@ekryski
ekryski / gist:1217644
Created September 14, 2011 20:12
Jade Layout error
//Code
app.get('/admin', function(req, res){
res.locals({'title': 'TLF - Admin'});
res.render('admin', {layout: 'Admin/layout'});
});
//Error
SyntaxError: Unexpected identifier
@ekryski
ekryski / everyauth-override-example
Created July 8, 2011 16:37
Everyauth Functions Overriding
, validateRegistration: function (regParams, errors) {
if (regParams.password.length < 8)
errors.push('Password must be at least 8 characters. ');
return errors;
}