Skip to content

Instantly share code, notes, and snippets.

View davis9001's full-sized avatar

David Monaghan davis9001

View GitHub Profile

Keybase proof

I hereby claim:

  • I am davis9001 on github.
  • I am davis9001 (https://keybase.io/davis9001) on keybase.
  • I have a public key ASBwY2aQXDM2qMLs7SQuU4pZEzDVA5FlhDutwrUX-4c94wo

To claim this, I am signing this object:

@davis9001
davis9001 / HelloName.class.php
Created August 26, 2017 15:34
"Hello World" php script to take a name and save it to MySQL.
<?php
// HelloName.class.php
// Prompt for a name on command line and save it to MySQL.
// All of this leading junk is for the exmaple.
// Requires an existing MySQL database named 'hello_name'.
// In that database there must be an existing table called 'names'.
// That table must have one row: 'name' (e.g. VARCHAR(255)).
// Username and password on the MySQL database as follows:
// This is a globally scoped variable:
var a = 1;
var Person = function() {
"use strict";
// We're setting a globally scoped variable here:
var a = 2;
var b = 7;
this.getVar = function() {
@davis9001
davis9001 / Core
Last active August 29, 2015 14:07
The Core
The Core

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

{
"metadata": {
"name": "Untitled0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@davis9001
davis9001 / gist:4546544634348301ff15
Created August 27, 2014 10:24
Print two random numbers between 1 - 6.
print("{0:.0f} {1:.0f}".format(random.random()*60/10, random.random()*60/10))
1HQ4bUYNXALngapGmxYiepuzi9Kir9bn4R
1Hmf2An8cXmLKcMQvpWyU1iHALqrJdQzDd
@davis9001
davis9001 / style.css
Created March 7, 2014 02:49
WordPress Child Theme Starter style.css
/*
Theme Name: Twenty Fourteen Child
Theme URI: http://example.com/twenty-fourteen-child/
Description: Twenty Fourteen Child Theme
Author: John Doe
Author URI: http://example.com
Template: twentyfourteen
Version: 1.0.0
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fourteen-child