As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 2K bytes over 1 Gbps network 20,000 ns | |
Disk seek (SSD) 100,000 ns | |
Read 1 MB sequentially from memory 250,000 ns | |
Round trip within same datacenter 500,000 ns |
<!DOCTYPE html> | |
<!--[if IE 8]> <html lang="sv-SE" class="no-js ie8"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html lang="sv-SE" class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Breakpoint detection test</title> | |
<style type="text/css" media="screen"> | |
@media screen and (min-width: 320px) { | |
#page:after { | |
content: 'smallest'; /* represent the current width-bracket */ |
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |
<?php | |
if ( !class_exists( 'CWS_Plugin_v2' ) ) : | |
class CWS_Plugin_v2 { | |
public function hook( $hook ) { | |
$priority = 10; | |
$method = $this->sanitize_method( $hook ); | |
$args = func_get_args(); | |
unset( $args[0] ); | |
foreach ( (array) $args as $arg ) { | |
if ( is_int( $arg ) ) |
<?php | |
/* | |
Plugin Name: Login Logo Custom CSS | |
Description: Custom CSS for the login screen | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
<?php | |
/* | |
Plugin Name: CWS Posts Per Page | |
Version: 0.1 | |
Description: Sets a custom number of posts to display per page, for specific types of views | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ | |
class CWS_Posts_Per_Page_Plugin { |
<?php | |
function debug_rewrite() { | |
global $wp, $wp_rewrite; | |
if ( !current_user_can( 'manage_options' ) ) | |
return; | |
echo '<pre>'; | |
var_dump( $wp->matched_rule ); | |
print_r( $wp_rewrite ); |
<?php | |
// Change /*CUSTOMIZE_THIS*/ to a unique name (two places). Go ahead, make it long. | |
// Like, your initials, and your full plugin name. | |
// e.g. MTJ_Some_Awesome_Plugin_Controller | |
/*CUSTOMIZE_THIS*/_Controller::init(); | |
class /*CUSTOMIZE_THIS*/_Controller { | |
function init() { |
<?php | |
function ernest_marples($postcode) { | |
$postcode = str_replace(" ", "", $postcode); | |
$url = "http://www.uk-postcodes.com/postcode/". urlencode($postcode) .".csv"; // Build the URL | |
$file = file_get_contents($url); | |
if (strpos($file, "html") === FALSE) { // Some error checking - if the file contains html, then we've been redirected to the homepage and something has gone wrong |