Skip to content

Instantly share code, notes, and snippets.

View chrisjlee's full-sized avatar
💭
🏈

Chris J. Lee chrisjlee

💭
🏈
View GitHub Profile
// Plain text URL to anchor tags Handlebars Helper
(function(){
// defines markup enhancement regex
var protocol = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim
, scheme = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
/*
* Registers a Helper method with handlebars which, given a string of
* plain text or existing markup, provides enhancements of plain text

Ember.js Workshop (Future Insights 2014)

Jesse Cravens

Jesse is a principal web engineer at frog where he works with the world’s leading companies, helping them to design, engineer, and bring to market meaningful products and services. He possesses a deep background in web application development, and has recently been focusing on single page web application architecture, the mobile web, and HTML5. Jesse’s first book, HTML5 Hacks, has been translated into multiple languages including Chinese and Japanese, and he has spoken internationally at conferences such as SXSW Interactive, Fluent Conf, Future Insights, Code PaLOUsa, and Øredev.

He previously held senior development and technical management positions at USAA, leading a team of mobile application developers in the planning, designing, development, testing, implementation and maintenance of USAA’s industry leading iOS, Android, Blackberry, and mobile web applications for USAA’s 8 million members deployed worldwide.

Jesse holds a B.A. in Art from

<div id="consolelog" style="font-family: 'Courier New', Courier, monospace; font-size: 12px; margin: 40px 30px 0px; background-color: white; border: 2px solid black; padding: 10px;"></div>
<input type="text" id="consoleinput" style="margin: 0px 30px; width: 400px;" onkeypress="return evalConsoleInput(event, this.value);" />
<script type="text/javascript">
var appendConsole = function(message, type) {
var color = "black";
if (type === "error") {
color = "red";
} else if (type === "debug") {
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);

Getting Started with YUI

Welcome to the YUI library! This tutorial contains everything you need to get up and running quickly with YUI. If you've never used YUI before, but you perhaps have a little experience with plain JavaScript or JavaScript frameworks, read onward.

Note that if you have experience with jQuery, it is a great idea to read or at least skim through the JS Rosetta Stone, which demonstrates how common jQuery and YUI idioms map to each other. The good news is that in the areas where YUI and jQuery overlap, you'll find that it is not too difficult to translate back and forth between the two.

Loading SimpleYUI

The easiest way to get started with YUI is to use SimpleYUI, a convenient package for working with DOM nodes, events, UI effects, and AJAX.

@chrisjlee
chrisjlee / Gruntfile.js
Created November 21, 2013 16:13 — forked from aschmoe/Gruntfile.js
This particular gruntfile actually is the runner to generate Drupal Subthemes.
'use strict';
var path = require('path');
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
copy: {
main: {
files: [
{
#!/bin/bash
DIR=/var/www/YOUR_APP_NAME
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NODE_PATH=/usr/local/lib/node_modules
case $1 in
start)
nohup "node" "$DIR/proxy.js" 1>>"$DIR/logs/proxy.log" 2>&1 &
echo $! > "$DIR/pids/proxy.pid";
;;
@chrisjlee
chrisjlee / _columnfix
Last active December 24, 2015 12:59 — forked from Celleb/_columnfix.scss
/* zurb foundation 4 grid column fix for ie8 and below */
@mixin grid-columns-ie($columns: 12){
$i: 1;
@while $i < $columns + 1 {
$colWidth: ($i/$columns)*100%;
$colWidth7: ($i/$columns)*98%;
& .large-#{$i}, & .small-#{$i} {
width: $colWidth;
*width: $colWidth7; //sets the width for ie7
<?php
/**
* @file
* local.settings.php (Drupal 7.x)
*
* This settings file is intended to contain settings specific to a local
* development environment, by overriding options set in settings.php.
*
* Include this file from your regular settings.php by including this at the
* bottom:
@chrisjlee
chrisjlee / template.php
Last active December 22, 2015 07:38 — forked from anonymous/gist:6438971
drupal 7: aggregation of stylesheets fix
<?php
function NAMEOFTHEME_preprocess_page(&$vars) {
// Use grouped import technique for more than 30 un-aggregated stylesheets (css limit fix for IE)
$css = drupal_add_css();
if (NAMEOFTHEME_css_count($css) > 26) {
$styles = '';
$suffix = "\n".'</style>'."\n";
foreach ($css as $media => $types) {
$prefix = '<style type="text/css" media="'. $media .'">'."\n";