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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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 | |
| // Generates a strong password of N length containing at least one lower case letter, | |
| // one uppercase letter, one digit, and one special character. The remaining characters | |
| // in the password are chosen at random from those four sets. | |
| // | |
| // The available characters in each set are user friendly - there are no ambiguous | |
| // characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option, | |
| // makes it much easier for users to manually type or speak their passwords. | |
| // | |
| // Note: the $add_dashes option will increase the length of the password by |
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
| $( "#clickme" ).click(function() { | |
| $( "#book" ).slideToggle( "slow", function() { | |
| // Animation complete. | |
| }); | |
| }); |
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 | |
| /** | |
| * Basic Node Creation Example for Drupal 7 | |
| * | |
| * This example: | |
| * - Assumes a standard Drupal 7 installation | |
| * - Does not verify that the field values are correct | |
| */ | |
| $body_text = 'This is the body text I want entered with the node.'; | |
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
| git diff --name-only v0.3 v0.4 | xargs -I{} rsync -Rv "{}" ~/Desktop/destination-dir/ |
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
| // Get # parameter | |
| var param = document.URL.split('#')[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
| # BEGIN WordPress | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.php$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule . /index.php [L] | |
| </IfModule> | |
| # END WordPress |
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
| # | |
| # Apache/PHP/Drupal settings: | |
| # | |
| # Protect files and directories from prying eyes. | |
| <FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$"> | |
| Order allow,deny | |
| </FilesMatch> | |
| # Don't show directory listings for URLs which map to a directory. |
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
| SELECT webform_submitted_data.sid, | |
| MAX(IF(`webform_submitted_data`.`cid` = 1, data, NULL)) firstname, | |
| MAX(IF(`webform_submitted_data`.`cid` = 2, data, NULL)) lastname, | |
| MAX(IF(`webform_submitted_data`.`cid` = 3, data, NULL)) email, | |
| MAX(IF(`webform_submitted_data`.`cid` = 4, data, NULL)) zip, | |
| MAX(IF(`webform_submitted_data`.`cid` = 5, data, NULL)) rfid | |
| FROM webform_submitted_data | |
| WHERE webform_submitted_data.nid = 1 | |
| GROUP BY webform_submitted_data.sid; |
OlderNewer