Skip to content

Instantly share code, notes, and snippets.

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f5dae393268>
Traceback (most recent call last):
File "/home/randylien/Envs/htccms/lib/python3.5/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/home/randylien/Envs/htccms/lib/python3.5/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/home/randylien/Envs/htccms/lib/python3.5/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception
six.reraise(*_exception)
File "/home/randylien/Envs/htccms/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
@randylien
randylien / GraphQL-Relay-Redux.md
Created February 17, 2016 08:49 — forked from idibidiart/GraphQL-Architecture.md
GraphQL/Relay: The End of Redux? ... Perhaps.

GraphQL allows us to define a model of our data on the server using a graph schema, which is the most natural way of describing the stuctures and relationships in our data. To feed our model with data, we define resolvers that use the db's own query language (SQL, NoSQL, or Graph query language, etc) or in-memory objects to resolve queries from the UI against the graph data model we define.

With each components in the UI component tree declaring its own data dependencies, GraphQL/Relay creates a projection of the graph data model that maps to the UI component tree, thus allowing us to have an application-agnostic data layer on the server, while at once giving us and UI-specific projection of the data. The queries from GraphQL server to the database are composed in an efficient manner based on the aggregate data dependencies that are declared by each component in the UI component tree, thus eliminating redundant queries to the database.

@randylien
randylien / clojure_thoughts.md
Created January 19, 2016 16:18 — forked from KevinGreene/clojure_thoughts.md
Thoughts on Clojure after introductory talk

Hey all,

Thanks for coming out and talking about Clojure and ClojureScript! I'm not going to be posting the source code for the project, as I'm still not 100% if it will end up monetized at all, but it will probably make it's way to GitHub eventually.

If you want to learn more about Clojure, ClojureScript, and how they can help you, you have a ton of options:

Intro:

Living Clojure by Carin Meier - http://www.amazon.com/Living-Clojure-Carin-Meier/dp/1491909048 - Also available at GRPL

Auto deployment script for CI with Git/Node.JS/Forever

Usage

1.Simply add the deploy.sh to your application folder

2.Start your service

deploy.sh start myApp.js
/*timestamp and datacreate
don't forget to set validate columns to ONLY DATA_VALUES for datacreate and timstamp columns
Do not allow to enter not valid data!
I don't know how to do this inside the script.*/
function onEdit(e) {
//########################## SETUP BEGIN ###################################
var dc = 'datacreate'; //set datacreate_column_header
var ts = 'timestamp'; //set timestamp_column_header
// var dc_fontcolor = '#808080'; //set font-color in HEX or CSS mode for datacreate column
// var ts_fontcolor = '#808080'; //set font-color in HEX or CSS mode for timestamp column
fs = require('fs')
cheerio = require('cheerio')
staticFolder = 'static'
imgFolder = 'img'
cssFolder = 'css'
cssRoot = __dirname + '/' + cssFolder
htmlFolder = 'views'
htmlRoot = __dirname + '/../application/' + htmlFolder
@randylien
randylien / README.md
Created September 7, 2013 16:46 — forked from necolas/README.md

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name
@randylien
randylien / Gruntfile.js
Created August 24, 2013 17:16
{,*}/ -> **
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
$bgcolor: hsl(53,56%,87%);
.button-primary {
background: $bgcolor;
color: if(lightness($bgcolor) < 50%, white, black);
}
@import "compass/utilities/sprites"; // Include compass sprite helpers
@import "compass/css3/background-size"; // Include helper to calc background size
@mixin sprite($name, $hover: false, $active: false) {
@include retina-sprite($name, $sprites, $sprites2x, $hover, $active);
}
// The general purpose retina sprite mixin.
//