A checklist of items to check when launching a website or application. Some items may be optional.
- Git Repo Setup
- Spelling, Grammer, Punctuation
- Forms
- Site Speed
- Multi-browser compatibility
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
}).listen(1337); | |
console.log('Server listening on port 1337'); |
UPDATE `wp_options` SET option_value = replace(option_value, 'CURRENT_URL', 'NEW_URL') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE `wp_posts` SET guid = REPLACE (guid, 'CURRENT_URL', 'NEW_URL'); | |
UPDATE `wp_posts` SET post_content = REPLACE (post_content, 'CURRENT_URL', 'NEW_URL'); | |
UPDATE `wp_postmeta` SET meta_value = REPLACE (meta_value, 'CURRENT_URL','NEW_URL'); |
// based on answer to question | |
// http://stackoverflow.com/questions/4391575/how-to-find-the-size-of-localstorage | |
(function showLocalStorageSize(){ | |
function stringSizeBytes(str) { | |
return str.length * 2; | |
} | |
function toMB(bytes) { | |
return bytes / 1024 / 1024; | |
} |
// Taken from | |
// http://calendar.perfplanet.com/2014/performance-measurements-using-chrome-devtools-code-snippets/ | |
var primesApp = { | |
findFirstPrimes: function () { | |
var n = Number(document.querySelector('#n').value); | |
console.log('finding first', n, 'primes'); | |
var primes = findFirstPrimes(n); | |
renderPrimes(primes); | |
} |
// Taken from | |
// https://github.com/addyosmani/timing.js | |
// http://calendar.perfplanet.com/2014/performance-measurements-using-chrome-devtools-code-snippets/ | |
/** | |
* Timing.js 1.0.1 | |
* Copyright 2014 Addy Osmani | |
*/ | |
(function(window) { |
// npm init | |
// install --save compression connect http serve-static | |
// vim server.js | |
var connect = require('connect'); | |
var http = require('http'); | |
var app = connect(); | |
var compression = require('compression') | |
app.use(compression()) |
// Clear interval and open contact form | |
var openPageslide =function (intervalName){ | |
clearInterval(intervalName); | |
setTimeout(function(){ | |
$('.pageslide a').trigger('click'); | |
}, 1400); | |
}; | |
// Pageslide |
<?php | |
add_action( 'admin_menu', 'my_theme_add_admin_menu' ); | |
add_action( 'admin_init', 'my_theme_settings_init' ); | |
function my_theme_add_admin_menu( ) { | |
add_menu_page( 'Theme Settings', 'My Settings', 'manage_options', 'my_theme_settings', 'my_theme_options_page', 'dashicons-admin-tools', 200 ); | |
} |
/** | |
* Parse url | |
* @param {string} url Url string | |
* @return {object} Parsed url object | |
* | |
* Example Use: | |
* var parsedUrl = parseURL('http://drive.google.com/search'); | |
* | |
* parsedUrl { | |
* domain: "drive.google.com", |