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($) { | |
$.extend($.fn, { | |
mirror : function() { | |
return | |
} | |
}); | |
})(jQuery); |
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($){ | |
/** | |
* Renders an image in gray scale using canvas | |
* @param {Boolean} toggle - Optional, whether or not to add or remove the grayscale effect | |
* @return {jQuery} | |
*/ | |
$.fn.grayScale = function(toggle) { | |
function _grayscale(src){ | |
var canvas = document.createElement('canvas'); |
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 dokimon = require('dokimon'), | |
assert = require('assert'); | |
var checkHomepage = new dokimon.Test( | |
'HomePageIsRunning', | |
{url : '/'}, | |
function(res, body) { | |
assert.equal(res.statusCode, 200, 'My website is not responding'); | |
} | |
); |
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 dokimon = require('dokimon'), | |
assert = require('assert'); | |
var checkHomepage = new dokimon.Test( | |
'HomePageIsRunning'... | |
); | |
var checkSiteSearch = new dokimon.TestPostForm( | |
'SearchIsWorking', | |
{ |
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
<script src="js/jquery/jquery.min.js"></script> | |
<script src="js/jquery/jquery.speechinterface.js"></script> | |
<script> | |
jQuery(document).ready(function() { | |
jQuery('body').speechInterface({ | |
debugMode : 2, | |
scrollLength : jQuery(window).height() * 0.4, | |
}); | |
}); | |
</script> |
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
... | |
<body> | |
<div id="counter"></div> | |
<a href="#" id="start-counter">Count down</a> | |
<script src="js/jquery.min.js"></script> | |
<script src="js/jquery.piechartcountdown.min.js"></script> | |
<script> | |
$('#start-counter').click(function() { | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="js/jquery.min.js"></script> | |
<script src="js/jquery.piechartcountdown.min.js"></script> | |
</head> | |
<body> | |
<div id="counter"></div> | |
<a href="#" id="count-down-button">Count down</a> | |
<script type="text/javascript"> |
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
<form action="" onsubmit="return $(this).validate()"> | |
<p> | |
Name (4 characters minimum): | |
<input name="user" data-validation="validate_min_length length4" /> | |
</p> | |
<p> | |
Birthdate (yyyy-mm-dd): | |
<input name="birth" data-validation="validate_birthdate" /> | |
</p> | |
<p> |
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
# Delete all missing files (!) | |
$ svn rm $( svn status | sed -e '/^!/!d' -e 's/^!//' ) | |
# grep all lines not starting with ? | |
$ ... | grep -v '^?' | |
# List large directories | |
$ sudo du -h / | grep ^[0-9.]*G |
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
tinyMCE.editors[0].onKeyPress.add(function(ed, e) { | |
alert(e.keyCode); | |
}); |
OlderNewer