Skip to content

Instantly share code, notes, and snippets.

View Deathspike's full-sized avatar

Deathspike

View GitHub Profile
@Deathspike
Deathspike / gist:5956468
Created July 9, 2013 10:46
Figure 17 01x13
1
00:02:11,500 --> 00:02:12,980
Okay, got it.
2
00:02:14,570 --> 00:02:16,600
They've found the Mother Maguar.
3
00:02:18,100 --> 00:02:20,050
@Deathspike
Deathspike / gist:5832139
Created June 21, 2013 15:49
js parsed html tree after consuming lexer tokens
[
{
"data": "<!DOCTYPE html>",
"index": 0,
"type": "doctype",
"indent": 0
},
{
"data": "\r\n",
"index": 15,
[
{
"data": "<!DOCTYPE html>",
"type": "doctype"
},
{
"data": "\r\n",
"type": "whitespace"
},
{
@Deathspike
Deathspike / gist:5366683
Created April 11, 2013 19:58
Fix for Komodo Edit 8 (Iced)CoffeeScript in langinfo_prog.py
class CoffeeScriptLangInfo(_JSLikeLangInfo):
name = "CoffeeScript"
exts = ['.coffee']
common_keywords = set(["true", "false", "null", "this",
"new", "delete", "typeof", "in", "instanceof",
"return", "throw", "break", "continue", "debugger",
"if", "else", "switch", "for", "while", "do", "try", "catch", "finally",
"class", "extends", "super",
"undefined", "then", "unless", "until", "loop", "of", "by", "when",
"and", "or", "is", "isnt", "not", "yes", "no", "on" "off",
@Deathspike
Deathspike / gist:5366681
Created April 11, 2013 19:57
Fix for Komodo Edit 8 (Iced)CoffeeScript in langinfo_prog.py
class CoffeeScriptLangInfo(_JSLikeLangInfo):
name = "CoffeeScript"
exts = ['.coffee']
common_keywords = set(["true", "false", "null", "this",
"new", "delete", "typeof", "in", "instanceof",
"return", "throw", "break", "continue", "debugger",
"if", "else", "switch", "for", "while", "do", "try", "catch", "finally",
"class", "extends", "super",
"undefined", "then", "unless", "until", "loop", "of", "by", "when",
"and", "or", "is", "isnt", "not", "yes", "no", "on" "off",
@Deathspike
Deathspike / gist:5082378
Created March 4, 2013 13:54
Regex html escape direct replace vs function cb replace.
var directReplace = (function () {
var escapeExp = /[&<>"]/, escapeAmpExp = /&/g, escapeLtExp = /</g, escapeGtExp = />/g, escapeQuotExp = /"/g;
return function (text) {
if (text == null) {
return '';
}
var result = text.toString();
if (!escapeExp.test(result)) {
return result;
}