Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html lang="en"> <!-- Set the language attribute to the language of your web page -->>
<head>
<title>HTML5 Stiff Bones</title>
<meta charset="utf8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Sets width to device default -->
<!-- Note: Add "maximum-scale=1.0; user-scalable=0;" attributes to viewport meta tag to prevent user scaling -->
<meta name="description" content=""> <!-- Your site's description -->
<meta http-equiv="X-UA-Compatible" content="chrome=1"> <!-- Chrome Frame: HTML5 support for IE 7,8,9 versions -->
@erikroyall
erikroyall / gist:5538077
Last active December 17, 2015 02:48
JavaScript Private Properties and Methods in Object- Oriented Programming
window.erik = (function(){
var Erik, erik;
Erik = function() {
this.name = "Erik Royall";
this.age = 14;
};
return erik = {
// Public Method
getName: function() {
<pagination class='paginator' role='toolbar'>
<ul class='goto-pages'>
<li class='goto-search'>
<a href="#search" class="search-pages" title="Toggle Advanced Search">&#8981;</a>
</li>
<li class='goto-page'>
<a href="/admin/users?page=1" aria-disabled="true" class="first-page disabled" data-page="1" rel="first" title="Go to the first page">&#8676;</a>
</li>
<li class='goto-page'>
<a href="/admin/users?page=1" aria-disabled="true" class="prev-page disabled" data-page="1" rel="prev" title="Go to page 1">&#8672;</a>
@erikroyall
erikroyall / evento.js
Last active September 23, 2016 17:03
A cross-browser event handling system
// Evento - v1.0.0
// by Erik Royall <erikroyalL@hotmail.com> (http://erikroyall.github.io)
// Dual licensed under MIT and GPL
// Array.prototype.indexOf shim
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
'use strict';
@erikroyall
erikroyall / print.js
Last active August 29, 2015 14:06
DOM print() function for... fun.
function print (o) {
var body = document.body
, ih = body.innerHTML;
body.innerHTML = ih ? ih + "<br/>" + o : o;
}
@erikroyall
erikroyall / my-style.js
Last active August 29, 2015 14:07
JavaScript and Semicolons
function Person (name, age) {
this.name = name;
this.age = age;
}
Person.prototype = {
getName: function () {
return this.name;
},
@erikroyall
erikroyall / backup.sh
Created April 15, 2015 13:40
Ubuntu Back Up Script
dpkg --get-selections > ~/Package.list
sudo cp -R /etc/apt/sources.list* ~/
sudo apt-key exportall > ~/Repo.keys
rsync --progress /home/`whoami` /path/to/user/profile/backup/here
@erikroyall
erikroyall / hilo-component.js
Last active April 9, 2016 06:25
Hilo Component's base structure
(function (rofl, lol, lmao) {
/*globals module: false, define: false*/
// http://ifandelse.com/its-not-hard-making-your-library-support-amd-and-commonjs/
// https://github.com/umdjs/umd/blob/master/commonjsStrict.js
if (typeof module !== "undefined" && module.exports) {
module.exports = lmao;
} else if (typeof define === "function" && define.amd) {
define(lmao);
@erikroyall
erikroyall / lamp.sh
Created July 13, 2015 20:06
LAMP Stack Install Script Ubuntu 14.04
apt-get update
apt-get install apache2
apt-get install mysql-server php5-mysql
mysql_install_db
mysql_secure_installation
apt-get install php5 libapache2-mod-php5 php5-mcrypt
sed -i.bak s/DirectoryIndex index.html index.cgi index.pl index.php/DirectoryIndex index.php index.html index.cgi index.pl/g /etc/apache2/mods-enabled/dir.conf
service apache2 restart
apt-get install php5-cli
@erikroyall
erikroyall / base.css
Last active August 29, 2015 14:25
Minimal CSS
*, *::before, *::after { display: none !important; }