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 | |
print '<pre>'; | |
var_dump(get_defined_vars()); | |
print '</pre>'; | |
?> |
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
git init | |
git remote add origin PATH/TO/REPO | |
git fetch | |
git checkout -t origin/master |
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
if (!$("input[name='html_elements']:checked").val()) { | |
alert('Nothing is checked!'); | |
} | |
else { | |
alert('One of the radio buttons is checked!'); | |
} |
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
$arr = array(...); | |
usort($arr, function($a, $b) { | |
$ad = new DateTime($a['dateTime']); | |
$bd = new DateTime($b['dateTime']); | |
if ($ad == $bd) { | |
return 0; | |
} |
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
zend_extension=xdebug.so | |
xdebug.remote_enable = 1 | |
xdebug.remote_connect_back = 1 | |
xdebug.idekey = "PHPSTORM" | |
xdebug.remote_handler = "dbgp" | |
xdebug.remote_port = 9000 |
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
.photo-of-the-day { | |
$root: &; | |
&--title{ | |
font-size: 16px; | |
} | |
&:hover{ | |
#{$root}--title { | |
text-decoration: underline; | |
} | |
} |
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
<style> | |
.google-maps { | |
position: relative; | |
padding-bottom: 75%; // This is the aspect ratio | |
height: 0; | |
overflow: hidden; | |
} | |
.google-maps iframe { | |
position: absolute; | |
top: 0; |
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
sudo apt-get install libicu-dev | |
cd /tmp | |
# Install depot_tools first (needed for source checkout) | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
export PATH=`pwd`/depot_tools:"$PATH" | |
# Download v8 | |
fetch v8 |
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 | |
/** | |
* Retrieve a page given its slug. | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @param string $page_slug Page slug | |
* @param string $output Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A. | |
* Default OBJECT. | |
* @param string|array $post_type Optional. Post type or array of post types. Default 'page'. |
OlderNewer