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> | |
<!-- Helpful things to keep in your <head/> | |
// Brian Blakely, 360i | |
// http://twitter.com/brianblakely/ | |
--> | |
<head> | |
<!-- Disable automatic DNS prefetching. | |
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
<?php | |
/** | |
* @file | |
* Demo module, Basic Ajax form submit (Ajax framework). | |
*/ | |
/** | |
* Implements hook_menu(). | |
*/ |
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
"\e[1~": beginning-of-line | |
"\e[4~": end-of-line | |
"\e[5~": history-search-backward | |
"\e[6~": history-search-forward | |
"\e[3~": delete-char | |
"\e[2~": quoted-insert | |
"\e[5C": forward-word | |
"\e[5D": backward-word | |
"\e\e[C": forward-word | |
"\e\e[D": backward-word |
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
<?php | |
/** | |
* Defines a theme callback function per registered path. | |
*/ | |
function MODULENAME_menu_alter(&$items) { | |
$items['node/%node']['theme callback'] = 'MODULENAME_default_node_theme'; | |
$items['node/%node/edit']['theme callback'] = 'MODULENAME_edit_node_theme'; | |
$items['node/%node/edit']['theme arguments'] = array(1); | |
} |
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
<?php | |
/** | |
* @file | |
* Re-usable stuff. | |
* | |
* @FIXME multifield function seems not to work in included several times in the same page. | |
*/ | |
/** | |
* Implements hook_theme() |
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
// Fun little quiz | |
Assuming this string: "January 5th, 2012" | |
In the shortest amount of code possible, place: | |
- 'January' within a $month variable | |
- '5th' within a $day variable | |
- '2012' within a $year variable. |
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
<?php | |
/** | |
* php-ansi-color | |
* | |
* Original | |
* https://github.com/loopj/commonjs-ansi-color | |
* | |
* @code | |
* <?php | |
* require_once "ansi-color.php"; |
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
// To turn on JS Aggregation | |
drush vset preprocess_js 1 --yes | |
// To clear all Cache | |
drush cc all | |
// To disable JS Aggregation | |
drush vset preprocess_js 0 --yes | |
// To clear cache of JS and CSS only |
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
Select all and delete (actually move to buffer) | |
:%d | |
Select all and copy to buffer | |
:%y | |
Use p to paste the buffer. |
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
<form> | |
<div> | |
<label><input type="checkbox" /> Label text</label> | |
</div> | |
<div> | |
<label><input type="checkbox" /> http://stackoverflow.com/questions/306252/how-to-align-checkboxes-and-their-labels-consistently-cross-browsers</label> | |
</div> | |
</form> | |
<style type="text/css"> |
OlderNewer