Skip to content

Instantly share code, notes, and snippets.

View diverted247's full-sized avatar

Ted Patrick diverted247

View GitHub Profile
@diverted247
diverted247 / gulpfile.js
Created November 7, 2014 22:07
Gulpfile to start a local server and open browser on mac/win/linux
var gulp = require('gulp');
var ts = require( 'gulp-tsc' );
var connect = require( 'gulp-connect' );
var shell = require( 'gulp-shell' );
// 1541 - Claude Garamond was commissioned to create fonts for King Francis I
// of France and established himself as the first type designer.
gulp.task( 'build' , function(){
return gulp.src( [ './src/txt/build.d.ts' ] )
font/apricot.txt
Missing: 35 #
font/burguesscript.txt
Missing: 94 ^
Missing: 126 ~
font/businesspenmanship.txt
Missing: 94 ^
Missing: 126 ~
'use strict';
var env = process.env.NODE_ENV || 'development';
var gulp = require( 'gulp' );
var path = require( 'path' );
var $ = require( 'gulp-load-plugins' )();
gulp.task( 'tsc' , function (){
return gulp.src( [ './app/src/build.ts' ] )
.pipe( $.tsc( {
@diverted247
diverted247 / gist:bea78fb53142e2fe5113
Last active August 29, 2015 14:06
Dev environment automation with bash
# add to ~/.bash_profile
# modify to your env
# also ... handy for server start/restart
alias _vu='cd ~/Dev/vestucom;workon vestucom;subl ~/Dev/vestucom;'
alias _vur='cd ~/Dev/vestucom;workon vestucom;open http://local.vestu.com:8080/;python manage.py runserver 8080'
@diverted247
diverted247 / character.py
Created August 29, 2014 21:05
Character Whitelist
#!/usr/bin/python
# -*- coding: utf8 -*-
#unicodeRange="U+0020-U+007E,U+00A1-U+00FF,U+2010-U+2036"
CHARS = {}
CHARS[ '13' ] = 1 #
#Unicode Latin
#Unicode 0020
@diverted247
diverted247 / viewer.html
Created August 29, 2014 17:57
Font Viewer (progress)
<!DOCTYPE html>
<html>
<head>
<title>txt: Text + Alignment Example</title>
<script type="text/javascript" src="../../src/easeljs-NEXT.min.js"></script>
<script type="text/javascript" src="../../src/txt/Graphics.js"></script>
<script type="text/javascript" src="../../src/txt/CharacterText.js"></script>
<script type="text/javascript" src="../../src/txt/Character.js"></script>
@diverted247
diverted247 / PathTextTest.js
Created August 27, 2014 13:54
Example PathText Usage
stage = new createjs.Stage( canvas );
var text = new txt.PathText( {
text:'The fox jumped over the log.',
font:'bernhardmodern bolditalic',
path:'m258 178 a 11 11 0 0 0 11 -11 a 19 19 0 0 0 -19 -19 a 29 29 0 0 0 -29 29 a 48 48 0 0 0 48 48 a 78 78 0 0 0 78 -78 a 126 126 0 0 0 -126 -126 a 205 205 0 0 0 -205 205 a 331 331 0 0 0 331 331 a 536 536 0 0 0 536 -536',
spacing:0,
size:100,
x:100,
y:100,
@diverted247
diverted247 / product.json
Created August 19, 2014 20:57
Sample Product json
{
"FileName": "STMPRC1407801914.xml",
"ProductCode": "STMPRC1407801914",
"ResponseStatus": {},
"SDXMLs": [
{
"fileName": "layout_1.xml",
"payload": {
"Template": {
"_ATCustomScriptVersion": "0.05",
@diverted247
diverted247 / Case.html
Created August 12, 2014 17:58
Character Case Example - Manipulating character case at the Text control... txt.Case.Normal,txt.Case.UPPER, txt.Case.LOWER, txt.Case.SMALL_CAPS
<!DOCTYPE html>
<html>
<head>
<title>txt: Case Example</title>
<script type="text/javascript" src="../src/easeljs-NEXT.min.js"></script>
<script type="text/javascript" src="../src/txt/Graphics.js"></script>
<script type="text/javascript" src="../src/txt/Text.js"></script>
<script type="text/javascript" src="../src/txt/Character.js"></script>
@diverted247
diverted247 / product.json
Created August 11, 2014 22:45
Sample product.json
{
"FileName": "INVH1401997655.xml",
"ProductCode": "INVH1401997655",
"ResponseStatus": {},
"SDXMLs": [
{
"fileName": "layout_1.xml",
"payload": {
"Template": {
"_ATCustomScriptVersion": "0.05",