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
| $sql = " | |
| SELECT | |
| p.ID AS id, | |
| p.post_title AS name | |
| FROM | |
| $wpdb->posts p | |
| LEFT JOIN $wpdb->postmeta pm ON | |
| p.ID = pm.post_id | |
| AND pm.meta_key = %s | |
| WHERE |
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() { | |
| var CSSCriticalPath = function(w, d) { | |
| var css = {}; | |
| var pushCSS = function(r) { | |
| // The last selector wins, so over-write | |
| // merging existing css will happen here... | |
| css[r.selectorText] = r.cssText; | |
| }; | |
| var parseTree = 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
| # First create the blank repository, then... git clone https://github.com/borkweb/whatever.git tmp-repo git clone --no-hardlinks tmp-repo new-repo cd new-repo git filter-branch --subdirectory-filter directory-to-migrate HEAD -- --all git reset --hard git gc --aggressive git prune git remote rm origin git remote add origin https://github.com/borkweb/new-repo.git git push origin master --force |
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 | |
| $data = 2.345; | |
| echo ~~$data . "\n\n"; // spits out: 2 | |
| $data = 2.8; | |
| echo ~~$data . "\n\n"; // spits out: 2 |
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 | |
| $memcache = new Memcache; | |
| $memcache->connect( 'localhost', 11211 ); | |
| if ( $memcache->flush() ) { | |
| echo 'BOOM! Flushed!<br>'; | |
| } else { | |
| echo 'Memcache Y U NO FLUSH?<br>'; | |
| }//end else |
NewerOlder