Skip to content

Instantly share code, notes, and snippets.

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
<?php
/**
* Example function description
*
* @since {Next WordPress SEO Version}
*
* @param {array, string, int, objext} {$variable_name} {Short description}
* @param {array, string, int, objext} {$variable_name} {Short description}
*

Here is a simple javascript redirect that uses the [Mobile Link Discovery Spec][1] a valid markup link tag that tells the browser where to find an Alternate for Hand-Held devices.

<link rel="alternate" media="handheld" href="http://m.google.com" />

simply replace m.google.com with the url of your mobile site.

and import this script

<script type="text/javascript" src="redirect.js"></script>

Here is a simple javascript redirect that uses the [Mobile Link Discovery Spec][1] a valid markup link tag that tells the browser where to find an Alternate for Hand-Held devices.

<link rel="alternate" media="handheld" href="http://m.google.com" />

simply replace m.google.com with the url of your mobile site.

and import this script

<script type="text/javascript" src="redirect.js"></script>
<?php
/*
GeoRSS formatted output for Google Maps
Authors: Alastair Mucklow, Chris Toppon
*/
//header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
//$more = 1;
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'" standalone="yes"?'.'>'; ?>

The idea is to have nginx installed and node installed. I will extend this gist to include how to install those as well, but at the moment, the following assumes you have nginx 0.7.62 and node 0.2.3 installed on a Linux distro (I used Ubuntu).

In a nutshell,

  1. nginx is used to serve static files (css, js, images, etc.)
  2. node serves all the "dynamic" stuff.

So for example, www.foo.com request comes and your css, js, and images get served thru nginx while everything else (the request for say index.html or "/") gets served through node.

  1. nginx listens on port 80.
# NPM CheatSheet.
# Super easy intall: npm comes with node now.
# To create your own npm package: https://www.npmjs.org/doc/misc/npm-developers.html
# More: https://www.npmjs.org/doc/
# 1. NPM Command Lines.
# Local mode is the default.
# Use --global or -g on any command to operate in global mode instead.
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@kublaj
kublaj / README.md
Last active August 29, 2015 14:13 — forked from mattdesl/README.md

tiny modules

Lately there's been some discourse on so-called module shaming1 — which can go both ways — with lots of confusion and misinformation all around.

So let's get to the meat of the topic: why would anyone publish a single-function module?

It might seem odd to have a module with just a single function (examples: clamp, lerp, is-clockwise, xtend, point-in-polygon). Sometimes your tests and documentation are longer than the function itself. Let's examine some of the benefits to this approach...

  • a terse and frozen API does not end up wit
@kublaj
kublaj / my.css
Created January 14, 2015 14:45 — forked from anonymous/my.css
CSS3 gradient animation http://www.gradient-animator.com
background: linear-gradient(270deg, #c9dcd7, #80a097, #588f7f, #164034, #8b8b2a, #4f4f19, #c597dc, #8d2887, #3faede, #6b1631, #a5697c, #ebe7e8, #668d4a, #75d82d, #2a4417, #c76921);
background-size: 3200% 3200%;
-webkit-animation: AnimationName 59s ease infinite;
-moz-animation: AnimationName 59s ease infinite;
-o-animation: AnimationName 59s ease infinite;
animation: AnimationName 59s ease infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}