Skip to content

Instantly share code, notes, and snippets.

View jnritchie's full-sized avatar

Justin Ritchie jnritchie

  • Caribbean
View GitHub Profile
@jnritchie
jnritchie / index.html
Created April 17, 2019 03:07 — forked from gaearon/index.html
Add React in One Minute
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@jnritchie
jnritchie / csv-to-json.php
Created March 24, 2019 15:39 — forked from robflaherty/csv-to-json.php
Convert CSV to JSON
<?php
/*
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on php.net
*/
header('Content-type: application/json');
// Set your CSV feed
@jnritchie
jnritchie / WordPress Custom Global Variables.md
Created March 13, 2019 15:37 — forked from aahan/WordPress Custom Global Variables.md
Creating and using custom global variables in wordpress.

First create global variables (in functions.php or as a mu-plugin):

<?php

/*
 * CUSTOM GLOBAL VARIABLES
 */
function wtnerd_global_vars() {
@jnritchie
jnritchie / contact.html
Created March 8, 2019 01:07
Mailgun Contact Form
<div class="contact-form">
<form id="contactform" name="contactform" method="post">
<div class="row">
<div class="col-sm-6">
<input name="name" class="form-control" type="text" placeholder="Name*"/>
</div>
<div class="col-sm-6">
<input name="email" class="form-control" type="email" placeholder="Email*"/>
</div>
<div class="clearfix"></div>
@jnritchie
jnritchie / Favicon MetaTags
Created January 16, 2019 20:38 — forked from cpswsg/Favicon MetaTags
Meta Tags for Favicon
<!-- Favicon -->
<meta name="msapplication-TileImage" content="images/favicons/tile.png"> <!-- Windows 8 -->
<meta name="msapplication-TileColor" content="#00CCFF"/> <!-- Windows 8 color -->
<!--[if IE]><link rel="shortcut icon" href="images/favicons/favicon.ico"><![endif]-->
<link rel="icon" type="image/png" href="images/favicons/favicon.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/favicons/apple-touch-icon-precomposed-144x144.png"><!-- iPad Retina-->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/favicons/apple-touch-icon-precomposed-114x114.png"><!--iPhone Retina -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/favicons/apple-touch-icon-precomposed-72x72.png"><!-- iPad 1 e 2 -->
<link rel="apple-touch-icon-precomposed" href="images/favicons/apple-touch-icon-precomposed-57x57.png"><!-- iPhone, iPod e Android 2.2+ -->
@jnritchie
jnritchie / airtime.liq
Created November 25, 2015 00:44 — forked from dz0ny/airtime.liq
Airtime random playout
jingli = playlist(mode='randomize',reload=1,reload_mode="rounds", "/home/baza/jingli/")
baza = playlist(mode='randomize',reload=1,reload_mode="rounds", "/home/baza/baza/")
baza_imported = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/stor/imported/")
default = random(weights = [5, 1, 2], [jingli,baza, baza_imported])
<div class="col-lg-12 col-md-12 col-sm-12" ng-controller="ContactController">
<div class="alert alert-danger" ng-show="error">
<button class="close" data-dismiss="alert">x</button>
<strong>Error!</strong> An error occured while trying to send message.
</div>
<div class="alert alert-success" ng-show="success">
<button class="close" data-dismiss="alert">x</button>
<strong>Success! </strong> Your message was successfully sent.
</div>
<form role="form" name="contactForm">
<form id="contact" name="contact" method="post">
<fieldset>
<label for="name" id="name">Name<span class="required">*</span></label>
<input type="text" name="name" id="name" size="30" value="" required/>
<label for="email" id="email">Email<span class="required">*</span></label>
<input type="text" name="email" id="email" size="30" value="" required/>
<label for="phone" id="phone">Phone</label>
<input type="text" name="phone" id="phone" size="30" value="" />