This file contains 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
var scriptsNodeList = document.getElementsByTagName('script'), | |
debugSet = false, | |
templates, scripts; | |
// convert node list to array | |
scripts = Array.prototype.slice.call(scriptsNodeList); | |
templates = scripts.filter(function(script) { | |
return script.type === 'text/x-handlebars-template'; |
This file contains 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
self.bold = function(state) { | |
self.printer.write(esc); | |
self.printer.write(chr(69)); | |
// 0 || 'off' = off | |
// 1 || 'on' = on | |
self.printer.write(chr(state)); | |
} |
This file contains 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
/*jshint multistr:true */ | |
var text = "Lorem ipsum Kat sit amet, KrisKris adipiscing elit. Vestibulum Kite consectetur lorem, KKris aliquam turpis Kilts nec. Nam vel mattis." | |
var myName = "Kris"; | |
var hits = []; | |
var count = 0; | |
console.log("**********************"); | |
for (var i=0; i<= text.length; i++) | |
{ | |
if(text[i]=="K") |
This file contains 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
#!/bin/sh | |
LOGFILE=./post-receive.log | |
DEPLOYDIR=$DEPLOYDIR # The place to deploy to. | |
echo -e "[log] Received push request at $( date +%F)" >> $LOGFILE | |
echo "[log] - Old SHA: $oldrev New SHA: $newrev Branch Name: $refname" >> $LOGFILE | |
echo "[log] Starting Deploy..." >> $LOGFILE |
This file contains 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
<!-- The link we want our bower bird to point to --> | |
[1]: http://www.bower.io | |
<!-- The image url we want to use for our img tag source --> | |
[2]: http://bower.io/img/bower-logo.png | |
<!-- | |
This will compile to two html nodes: | |
Anchor: [linked item][1]: <a href="1">linked item</a> | |
Image: ![alt text][2]: <img src="2" alt="alt text" /> |
This file contains 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
grunt.event.on('watch', function (action, path, target) { | |
if (target === 'html' || target === 'css' /* and on and on for your target types in watch */) { | |
grunt.config(['clean', 'any'], []); | |
// Making an assumption your using sftp and have a current working directory setup | |
cwd = grunt.config.get(['sftp', 'cwd']) + '/'; | |
path = path.replace(cwd, ''); | |
grunt.config(['sftp', 'options', 'path'], path); | |
} | |
}); |
This file contains 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
grunt.initConfig({ | |
// ...other plugins | |
jshint: { | |
files: [ | |
'Gruntfile.js', | |
'cookiejar.js', | |
'test/*.js' | |
] | |
}, // ...other plugins | |
}); |
This file contains 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
var developerz = [ | |
{ name: "Chase", masterOf: "Learning New Things" }, | |
{ name: "Nate", masterOf: "The Rubies" }, | |
{ name: "Brandon", masterOf: "Javascript" }, | |
// Cache Rules Everything Around Me... | |
{ name: "Ryan", masterOf: "C.R.E.A.M." }, | |
{ name: "Brian", masterOf: "All the things!" } | |
]; | |
console.table(developerz); |
This file contains 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
// Generated on 2013-08-07 using generator-jekyllrb 0.3.6. Yo Jekyll! | |
'use strict'; | |
var liveReloadPort = 35729; | |
var packagejson = require('./package.json'); | |
var lrSnippet = require('connect-livereload')({port: liveReloadPort}); | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; | |
var yeomanConfig = { | |
pkg: packagejson, |
This file contains 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
{ | |
"directory": "src/_lib", | |
"json": "bower.json" | |
} |