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 mval = require('mval'), | |
MANIFEST = mval.MANIFEST; | |
// Validate android manifest file | |
var errors = mval.validate('AndroidManifest.xml', MANIFEST.ANDROID); | |
if( errors.length > 0 ) { | |
throw new Error('AndroidManifest.xml is invalid \n'+errors.join('\n')); | |
} | |
// You can of course also validate ordinary objects |
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
// Make the element editable by double clicking on it | |
$('#some-element').editable(); | |
// There are some options you can configure when initiating | |
// the editable feature as well as a callback function that | |
// will be called when textarea gets blurred. | |
$('#some-element').editable({ | |
touch : true, // Whether or not to support touch (default true) | |
lineBreaks : true, // Whether or not to convert \n to <br /> (default true) | |
toggleFontSize : true, // Whether or not it should be possible to change font size (defualt 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
<div id="editable-area"> | |
<p> | |
<em class="start-info">Double click on the text to edit</em> | |
<em class="edit-info" style="display: none"> | |
Start typing to change the text | |
<span class="info mac">(cmd + ↑ or cmd + ↓ to change font size)</span> | |
<span class="info windows">(ctrl + ↑ or ctrl + ↓ to change font size)</span> | |
</em> | |
</p> | |
<div class="editable"> |
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
<?php | |
/** | |
* Class that manages all post meta attached to posts by my plugin. This class can be used as an | |
* ordinary PHP object (stdClass) | |
* | |
* @requires PHP version >= 5.1, WordPress version >= 1.6 | |
* @package MyPlugin | |
* @since 0.1 | |
*/ |
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
<?php | |
/** | |
* Class that contains all the options for my plugin. This class can be used as an | |
* ordinary PHP object (stdClass) | |
* | |
* @requires PHP version >= 5.1, WordPress version >= 1.6 | |
* @package MyPlugin | |
* @since 0.1 | |
*/ |
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
This plugin has moved to | |
https://github.com/victorjonsson/jquery-editable |
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
- Wide set of classes for encryption | |
https://github.com/phpseclib/phpseclib | |
- Image manipulation | |
https://github.com/Gregwar/ImageBundle | |
- CLI utilities | |
https://github.com/jlogsdon/php-cli-tools |
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); | |
}); |
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
<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> |