Skip to content

Instantly share code, notes, and snippets.

View luke-au's full-sized avatar

Luke luke-au

  • Geelong, Australia
  • 08:51 (UTC +10:00)
View GitHub Profile
@luke-au
luke-au / index.html
Created November 10, 2023 10:15
Pokemon Cards Holo effect v2
<svg viewBox="0 0 330 330">
<g>
<path d="M304.394,139.394l-139.39,139.393L25.607,139.393c-5.857-5.857-15.355-5.858-21.213,0.001 c-5.858,5.858-5.858,15.355,0,21.213l150.004,150c2.813,2.813,6.628,4.393,10.606,4.393s7.794-1.581,10.606-4.394l149.996-150 c5.858-5.858,5.858-15.355,0-21.213C319.749,133.536,310.251,133.535,304.394,139.394z" />
<path d="M154.398,190.607c2.813,2.813,6.628,4.393,10.606,4.393s7.794-1.581,10.606-4.394l149.996-150 c5.858-5.858,5.858-15.355,0-21.213c-5.857-5.858-15.355-5.858-21.213,0l-139.39,139.393L25.607,19.393 c-5.857-5.858-15.355-5.858-21.213,0c-5.858,5.858-5.858,15.355,0,21.213L154.398,190.607z" />
</g>
</svg>
<p class="scroll">Scroll 4 moar!</p>
<!--
yes, im totally cheating here... I built these cards and app in SvelteKit and thought I'd be able to export it into a plain JS file to put in Codepen... however it seems it's not possible, and Codepen can't handle Svelte (yet?), so I deployed to Netlify and linked with an iFrame.
@luke-au
luke-au / css-paper-playing-around-with-lh.markdown
Created November 10, 2023 09:35
css paper (playing around with lh)
@luke-au
luke-au / chart-js-gradients.markdown
Created November 10, 2023 09:22
Chart.js Gradients
@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 / 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 / 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 / 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 / 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 / Contract Killer 3.md
Created November 26, 2018 01:07 — forked from malarkey/Contract Killer 3.md
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 / 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');