Skip to content

Instantly share code, notes, and snippets.

View luke-au's full-sized avatar

Luke luke-au

  • Geelong, Australia
  • 22:05 (UTC +10:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am luke-au on github.
  • I am spinningwebs (https://keybase.io/spinningwebs) on keybase.
  • I have a public key ASBIDeiGW3Z0HlPHNCwZbmWBaweDp1IEiBWKDeMqKOoeUAo

To claim this, I am signing this object:

@luke-au
luke-au / local-time.php
Created October 17, 2017 02:47
Properly fetch the local date / time in WordPress based on a Unix timestamp. https://gist.github.com/wpscholar/5900473
<?php
/**
* Fetch the local date/time in WordPress based on a Unix timestamp.
*
* @param int $timestamp
* @param string $format
* @return string
*/
function get_wp_local_date_time( $timestamp, $format = '' ) {
$format = !empty( $format ) ? $format: get_option('date_format') . ' ' . get_option('time_format');
@luke-au
luke-au / Contract Killer 3.md
Created November 26, 2018 01:07
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@luke-au
luke-au / gist:d26ba2dc145d6226cf8c737b542ca986
Created September 30, 2020 23:33 — forked from dustyf/gist:b6e72a7a7fd05de9598e
Example WordPress Simple JSON Endpoint Plugin
<?php
/**
* Plugin Name: WDS GIF API
* Plugin URI: http://webdevstudios.com
* Description: Adds a Custom Post Type to store GIFs and an API JSON Endpoint to access GIFs by a tag.
* Author: WebDevStudios
* Author URI: http://webdevstudios.com
* Version: 1.0.0
* License: GPLv2
*/
@luke-au
luke-au / epaaq.5m.php
Created October 11, 2020 06:29 — forked from jasonsnell/epaaq.5m.php
Air quality from PurpleAir sensor but with EPA adjustments
#!/usr/bin/env php
<?php
error_reporting( 0 );
// This version uses the "EPA adjustment" for wood smoke
// since my version is really meant to be when there are fires.
// Info here: <https://cfpub.epa.gov/si/si_public_file_download.cfm?p_download_id=540979&Lab=CEMM>
// jsnell@intertext.com
@luke-au
luke-au / voices.txt
Last active September 16, 2021 05:20 — forked from mculp/voices.txt
List of voices available by the `say` command on OS X
Agnes en_US # Isn't it nice to have a computer that will talk to you?
Albert en_US # I have a frog in my throat. No, I mean a real frog!
Alex en_US # Most people recognize me by my voice.
Alice it_IT # Salve, mi chiamo Alice e sono una voce italiana.
Alva sv_SE # Hej, jag heter Alva. Jag är en svensk röst.
Amelie fr_CA # Bonjour, je m’appelle Amelie. Je suis une voix canadienne.
Anna de_DE # Hallo, ich heiße Anna und ich bin eine deutsche Stimme.
Bad News en_US # The light you see at the end of the tunnel is the headlamp of a fast approaching train.
Bahh en_US # Do not pull the wool over my eyes.
Bells en_US # Time flies when you are having fun.
@luke-au
luke-au / functions.php
Created October 8, 2021 01:12 — forked from jaredatch/functions.php
WordPress Search Autocomplete using admin-ajax.php
<?php
/**
* Enqueue scripts and styles.
*
* @since 1.0.0
*/
function ja_global_enqueues() {
wp_enqueue_style(
'jquery-auto-complete',
@luke-au
luke-au / functions.php
Created October 8, 2021 01:13 — forked from jaredatch/functions.php
WordPress Search Autocomplete using WP REST API v2
<?php
/**
* Enqueue scripts and styles.
*
* @since 1.0.0
*/
function ja_global_enqueues() {
wp_enqueue_style(
'jquery-auto-complete',
@luke-au
luke-au / chart-js-gradients.markdown
Created November 10, 2023 09:22
Chart.js Gradients
@luke-au
luke-au / css-paper-playing-around-with-lh.markdown
Created November 10, 2023 09:35
css paper (playing around with lh)