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
This is just a test. |
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
/*! | |
* bringToTop | |
* https://gist.github.com/erming/11193183 | |
*/ | |
(function($) { | |
var highest = 1; | |
$.fn.bringToTop = function() { | |
return this.css('z-index', highest++); | |
}; | |
})(jQuery); |
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 _ = require("lodash"); | |
function Model(attr) { | |
_.merge(this, _.extend({ | |
id: 1, // this.id | |
text: "", // this.text | |
}, attr)); | |
}; | |
var m = new Model({ |
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
/*! | |
* uniqueClass | |
* https://gist.github.com/erming/11212325 | |
*/ | |
(function($) { | |
$.fn.uniqueClass = function(name) { | |
return this.addClass(name).siblings().removeClass(name).end(); | |
}; | |
})(jQuery); |
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
// | |
// Check if string contains any of the supplied words. | |
// | |
// Usage: | |
// "".contains(a, b, ...); | |
// | |
// Returns [true|false] | |
// | |
String.prototype.contains = function() { | |
var args = arguments; |
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
alias t1='tree -L 1' | |
alias t2='tree -L 2' | |
alias t3='tree -L 3' |
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
// Get the last word of a string. | |
function last(str) { | |
return str.trim().split(" ").pop(); | |
} |
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
<!doctype html> | |
<html> | |
<head> | |
<title>-webkit-overflow-scrolling</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no"> | |
<style> |
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
// Requires: | |
// <script src="mustache.js"></script> | |
// Template cache | |
var tpl = []; | |
// | |
// Render templates. | |
// | |
// Usage: |
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
function escape(text) { | |
var e = { | |
"<": "<", | |
">": ">" | |
}; | |
return text.replace(/[<>]/g, function (c) { | |
return e[c]; | |
}); | |
} |
OlderNewer