This file contains hidden or 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 gulp = require('gulp') | |
, litmus = require('gulp-litmus') | |
, gutil = require('gulp-util') | |
, ftp = require('gulp-ftp') | |
, inlineCss = require('gulp-inline-css') | |
, replace = require('gulp-replace') | |
, runSequence = require('run-sequence') | |
, config = require('./config.json') | |
; |
This file contains hidden or 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
function revealPath (path, options) { | |
var revealedAttributes = {'stroke-dashoffset': 0} | |
, options = options || {} | |
, easing = mina[options.ease] || mina.easein | |
, duration = options.duration || 1000 | |
path.animate(revealedAttributes, duration, easing, options.afterRevealPath) | |
} | |
function getHiddenAttributes (path) { |
This file contains hidden or 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
# Test results | |
# task model: | |
# - has working migration for development (FAILED) | |
# - Expected 0 to equal 6. | |
# - can set and save a new task (FAILED) | |
# - Expected 0 to equal 7. | |
# - can mark a task as complete (ok) | |
# - can fetch complete tasks (FAILED) | |
# - Error: Assertion failed: Cannot reindex view 'completed' which has no map block set | |
# - can remove completed tasks (FAILED) |
This file contains hidden or 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
it('create with 2 items', function () { | |
item.set({ | |
title: "The cloud atlas", | |
author: "David Mitchell" | |
}); | |
item.save(); | |
item.set({ | |
title: "Design of design", | |
author: "Brooks" |
This file contains hidden or 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
/* | |
* copy and paste into your browser's console to run and | |
* then use like so | |
* interprete("Jajwd tujwfynts wjfhmjx f wnxp-fxxjxxrjsy xyflj. Fy ymnx utnsy rd ijyjwrnsfynts nx ymfy snfsynh nx hfzxnsl rtwj ywtzgqj ymfs ny nx btwym") | |
*/ | |
// simple deciphering scheme | |
var alphabet = "abcdefghijklmnopqrstuvwxyz"; | |
var sillyAlphabet = "vwxyzabcdefghijklmnopqrstu"; | |
var decrypt = {}; |
This file contains hidden or 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
// checks our test conditions | |
// @param - condition (function) test to run | |
// @param - ref (string) to display for result | |
assert = function (condition, ref){ | |
if(condition){ | |
console.log("+ Passed: " + ref); | |
} else { | |
console.log("- Failed: " + ref, 'warn'); | |
} | |
}; |
This file contains hidden or 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
// remove special characters from strings | |
// @return {string} | |
String.prototype.removeSpecialCharacters = function (){ | |
return this.replace(/\t|\?|\r/gi,'').replace(/\n|\_|\-/gi,' '); | |
}; |
This file contains hidden or 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
function log(message){ | |
if(window.console){ | |
console.log(message); | |
} | |
} | |
function warn(message){ | |
if(window.console){ | |
console.warn(message); | |
} |
This file contains hidden or 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 table = {}, cloth = {}; | |
table.clean = false; | |
cloth.clean = true; | |
// clean the table please | |
function wipeTable(cloth){ | |
console.log("cleaning table"); | |
if(cloth.clean){ | |
table.clean = true; |
This file contains hidden or 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
SELECT TRIM(TRAILING SUBSTR(value,NEW_LINE_INDEX-1) | |
FROM value) as NEW_VALUE | |
FROM ( | |
SELECT INSTR(value, "\n") | |
AS NEW_LINE_INDEX, | |
value | |
FROM table | |
WHERE value != "" | |
ORDER BY value | |
) findNewLines |