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
/* | |
Takes a CSS property name string and returns its DOM notation. | |
@example: shape-inside -> shapeInside | |
@example: -webkit-shape-inside -> webkitShapeInside | |
@param {String} str CSS property name, possibly hyphenated. | |
@return {String} | |
*/ | |
function getDOMCSSProperty(str){ |
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 get(url){ | |
return new Promise(function(resolve, reject){ | |
// request strategies: ajax, jsonp | |
var types = ['json', 'jsonp']; | |
function call(){ | |
// try data type strategies one-by-one; mutates the array | |
var type = types.shift(); |
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
/* | |
Mock-implementation of chrome.runtime messaging API | |
*/ | |
var Messager = (function (){ | |
var _listeners = []; | |
return { | |
onMessage: { | |
addListener: function(cb){ | |
_listeners.push(cb); |
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
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
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
// addEventListener wrapper | |
// returns function for auto-unbinding | |
function on(elem, type, fn) { | |
elem.addEventListener(type, fn, false); | |
return function () { | |
off(elem, type, fn); | |
}; | |
} | |
// removeEventListener wrapper |
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
/** | |
* @author Razvan Caliman, razvan.caliman@gmail.com | |
*/ | |
/** | |
* wrapper for browser sniffing / capabilities check methods | |
*/ | |
var browser = {}; | |
/** |
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
.grid_container{ | |
position:relative; | |
width:100%; | |
} | |
.grid_half{ | |
width:50%; | |
float:left; | |
} |
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 loadScript(url, callback){ | |
var script = document.createElement("script") | |
script.type = "text/javascript"; | |
if (script.readyState){ //IE | |
script.onreadystatechange = function(){ | |
if (script.readyState == "loaded" || | |
script.readyState == "complete"){ | |
script.onreadystatechange = null; |
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
mysqldump -h localhost -u username -ppassword dbname1 dbname2 --compress --default-character-set=utf8 | gzip -c --best > `date +%Y_%m_%d_dbname.sql.gz` |
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
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/javascript text/javascript text/css application/x-javascript |
OlderNewer