Categories
Apply to

Implementing A Service Worker For Single-Page App WordPress Sites – Smashing Magazine

LOAD AN APPLICATION SHELL (OR APPSHELL) FIRST LINKIf the SPA architecture supports it, load an appshell first (i.e. minimal HTML, CSS and JavaScript to power the user interface), under https://www.mydomain.com/appshell/. Once loaded, the appshell will dynamically request content from the server through an API. Because all of the appshell’s assets can be precached using service workers, the website’s frame will load immediately, speeding up the first meaningful paint. This scenario uses the “cache falling back to network” caching strategy.Watch out for conflicts! For instance, WordPress outputs code that is not supposed to be cached and used forever, such as nonces, which usually expire after 24 hours. The appshell, which service workers will cache in the browser for more than 24 hours, needs to deal with nonces properly.EXTRACT WORDPRESS RESOURCES ADDED THROUGH WP_ENQUEUE_SCRIPT AND WP_ENQUEUE_STYLE LINK

Source: Implementing A Service Worker For Single-Page App WordPress Sites – Smashing Magazine

Categories
Apply to

How to Install Node.js and NPM on a Mac

In this article, I’ll take you through the process of installing Node.js and NPM on a Mac using Homebrew.

Installing Node.js and NPM is pretty straightforward using Homebrew. Homebrew handles downloading, unpacking and installing Node and NPM on your system. The whole process (after you have XCode and Homebrew installed) should only take you a few minutes.

  1. Open the Terminal app and type brew install node.
  2. Sit back and wait. Homebrew downloads some files and installs them. And that’s it.

To make sure you have Node and NPM installed, run two simple commands to see what version of each is installed:

  • To see if Node is installed, type node -v in Terminal. This should print the version number so you’ll see something like this v0.10.31.
  • To see if NPM is installed, type npm -v in Terminal. This should print the version number so you’ll see something like this 1.4.27

Source: How to Install Node.js and NPM on a Mac

Categories
Apply to

SQL to Change WordPress Domain URL (Example)

/* Begin Here */UPDATE wp_posts SET guid = replace(guid, ‘http://olddomain.com’,’http://newdomain.com’);UPDATE wp_posts SET post_content = replace(post_content, ‘http://olddomain.com’, ‘http://newdomain.com’);UPDATE wp_links SET link_url = replace(link_url, ‘http://olddomain.com’, ‘http://newdomain.com’);UPDATE wp_links SET link_image = replace(link_image, ‘http://olddomain.com’, ‘http://newdomain.com’);UPDATE wp_postmeta SET meta_value = replace(meta_value, ‘http://olddomain.com’, ‘http://newdomain.com’);UPDATE wp_usermeta SET meta_value = replace(meta_value, ‘http://olddomain.com’, ‘http://newdomain.com’);/*UPDATE wp_options SET option_value = replace(option_value, ‘http://olddomain.com’, ‘http://newdomain.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’ OR option_name = ‘widget_text’ OR option_name = ‘dashboard_widget_options’;*/UPDATE wp_options SET option_value = replace(option_value, ‘http://olddomain.com’, ‘http://newdomain.com’);

Source: SQL to Change WordPress Domain URL (Example)

Categories
CSS

Holy Grail | Alligator.io

Holy Grail has been achieved using variety of methods, probably most notably recently with Flexbox. CSS Grid Layout is yet another method, and it should prove to be the most appropriate and straightforward way when browser support gets better. It was designed especially to easily accomplish full page layouts.

Source: https://alligator.io/css/css-grid-holy-grail-layout/

Categories
Apply to

The Myth of Wealthy Men and Beautiful Women

Similarity and companionship are the currency of attraction, for better or worse.

Source: The Myth of Wealthy Men and Beautiful Women

 

PDF http://socialscience.nl/wp-content/uploads/2013/04/Volume-2-Issue-1-Article-2.pdf

 

Categories
Apply to

WordPress Time

echo "current_time( 'mysql' ) returns local site time: " . current_time( 'mysql' ) . ' ';
echo "current_time( 'mysql', 1 ) returns GMT: " . current_time( 'mysql', 1 ) . ' ';
echo "current_time( 'timestamp' ) returns local site time: " . date( 'M j, Y g:i a', current_time( 'timestamp', 0 ) ) . ' ';
echo "current_time( 'timestamp', 1 ) returns GMT: " . date( 'Y-m-d H:i:s', current_time( 'timestamp', 1 ) ) . ' ';

Yields

current_time( ‘mysql’ ) returns local site time: 2017-10-06 21:48:07
current_time( ‘mysql’, 1 ) returns GMT: 2017-10-07 01:48:07
current_time( ‘timestamp’ ) returns local site time: Oct 6, 2017 9:48 pm
current_time( ‘timestamp’, 1 ) returns GMT: 2017-10-07 01:48:07

Categories
Apply to

Secrets of Melanesia – YouTube

 

kid wearing I love boobies tshirt
http://take.ms/WiU8G
Kid tshirt I heart boobies

Categories
Apply to

The Genealogy of the Moral Modules

https://link.springer.com/article/10.1023/A:1022902510039

 

http://www.sscnet.ucla.edu/anthro/faculty/fiske/RM_PDFs/Bolender_Moral_Modules_2003.pdf