Skip to content

Instantly share code, notes, and snippets.

View flipflop's full-sized avatar

Rozario Chivers flipflop

View GitHub Profile
@flipflop
flipflop / index.html
Created February 21, 2019 12:40
Declarative React Layouts by Rozario Chivers // source https://jsbin.com/wizelen
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Declarative React Layouts by Rozario Chivers</title>
<style>
body {
font-family: arial;
counter-reset: component-counter;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style>
body {
font-family: arial;
counter-reset: component-counter;
@flipflop
flipflop / README.md
Created January 29, 2019 13:34
SCRIPT-8
@flipflop
flipflop / README.md
Created January 28, 2019 06:54
SCRIPT-8
import Ember from 'ember';
import hbs from 'htmlbars-inline-precompile';
import { connect } from 'ember-redux';
const stateToComputed = state => {
return {
number: state.number
};
};
@flipflop
flipflop / README-Template.md
Created February 6, 2018 21:24 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@flipflop
flipflop / gist:5943031
Created July 7, 2013 10:22
JavaScript Essentials
// 1. JS Namespacing
if (typeof mynamespace != "object") { var mynamespace = {}; }
mynamespace.component = function() {
// component safely nestled within a namespace
};
// 2. get a class name from multiples
$("#content").attr("class").split(" ")[0];
// 3. argument defaulting
@flipflop
flipflop / gist:1263098
Created October 4, 2011 22:55
Non UI Blocking Script include
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
@flipflop
flipflop / gist:1263020
Last active September 27, 2015 11:28
Mobile Detection with Optional Zepto / jQuery include
<?php
$deviceClass = "";
if (ereg('iPhone',$_SERVER['HTTP_USER_AGENT']) || ereg('iPod',$_SERVER['HTTP_USER_AGENT'])) {
$deviceClass = "ui-iphone";
} else if (ereg('iPad',$_SERVER['HTTP_USER_AGENT'])) {
$deviceClass = "ui-ipad";
} else if (ereg('Android',$_SERVER['HTTP_USER_AGENT']) && ereg('Mobile Safari',$_SERVER['HTTP_USER_AGENT'])) {
$deviceClass = "ui-android";
};
?>
@flipflop
flipflop / gist:1251044
Created September 29, 2011 15:47
JavaScript Module
/*
* Module pattern (public and private members within a namespace)
* Creates chassis.example namespace
* Note: ; before parenthesis is deliberate
*
* Below is an example of a flexible multi-part module that can be loaded
* in any order with loose augmentation.
*
*/