A hand crafted markdown document contains all major Javascript topics covered, taken from different sources. Brush Up your JS memory.
Single line comments start with //
. For multi-line commands, you use /* ... */
// This is a single line comment
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
*/ | |
$args = array( |
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
<?php | |
/** | |
* Show posts which are only under uncategorized term | |
* 1 is the id of Uncategorized term | |
*/ | |
function op_show_only_uncategorized( $query ) { | |
if ( is_admin() || ! $query->is_main_query() || ! $query->is_category( 1 ) ) { | |
return; | |
} | |
<?php | |
$caseNo = 0; | |
foreach (range(1, 9) as $numberOne) { | |
$makeNumberOne = ($numberOne * 100) + 62; | |
foreach (range(1, 9) as $numberTwo) { |
<!-- HEAD SECTION --> | |
<!-- IE Edge Meta Tag --> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<!-- Viewport --> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> |
// disable update notice for plugins | |
function disable_plugin_updates( $value ) { | |
$pluginsToDisable = [ | |
'plugin-folder-name-1/main-file-name-1.php', | |
'plugin-folder-name-2/main-file-name-2.php', | |
]; | |
if ( isset($value) && is_object($value) ) { | |
foreach ($pluginsToDisable as $plugin) { | |
if ( isset( $value->response[$plugin] ) ) { | |
unset( $value->response[$plugin] ); |
function isRetinaDisplay() { | |
if (window.matchMedia) { | |
var mq = window.matchMedia("only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)"); | |
return (mq && mq.matches || (window.devicePixelRatio > 1)); | |
} | |
} |