Skip to content

Instantly share code, notes, and snippets.

View heyawhite's full-sized avatar

Alexandra White heyawhite

View GitHub Profile
@heyawhite
heyawhite / README.md
Last active October 27, 2023 06:08
Welcome README
@heyawhite
heyawhite / heyawhite-speaker-policy.md
Last active October 19, 2023 22:11
Alexandra White's speaking policy
@heyawhite
heyawhite / keybase.md
Created July 20, 2018 20:28
Keybase validation

Keybase proof

I hereby claim:

  • I am heyawhite on github.
  • I am heyawhite (https://keybase.io/heyawhite) on keybase.
  • I have a public key ASD8eKB4RqkN5Se0SHwLZycctd601qZaJ8aTsHWv2KwiMQo

To claim this, I am signing this object:

@heyawhite
heyawhite / prometheus-sandbox.md
Last active December 18, 2017 14:40
Create an Ubuntu infrastructure sandbox and add Docker tools

Create a Prometheus instance within an infrastructure container

Get into your Triton environment

$ eval "$(triton env)"

Create an ubuntu infrastructure container

/************************************************************
NORMALIZE CSS
Do not touch the CSS between these line breaks
**********************************************************/
/*! normalize.css v7.0.0 | MIT License */
button,hr,input{overflow:visible}audio,canvas,progress,video{display:inline-block}progress,sub,sup{vertical-align:baseline}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,
@heyawhite
heyawhite / basic-website-html
Created August 8, 2017 18:36
Basic Website HTML
<!DOCTYPE html>
<html>
<head>
<title>My website</title>
<!-- Normalize -->
<link rel='stylesheet' id='main' href='css/normalize.css' type='text/css' media='all' />
<!-- Custom CSS -->
<link rel='stylesheet' id='main' href='css/style.css' type='text/css' media='all' />
</head>
@heyawhite
heyawhite / enqueue-scripts-on-wp.php
Last active March 15, 2017 18:40
Add scripts to WP
<?php
/** General add scripts **/
function adding_scripts_to_footer() {
// jQuery is already a part of the WP library. See: https://developer.wordpress.org/reference/functions/wp_enqueue_script/
wp_enqueue_script('jquery');
// Additional scripts, it's best to always register and then enqueue
wp_register_script('my_amazing_script', plugins_url('../js/amazing_script.js', _FILE_), array('jquery'), '1.1', true);
wp_enqueue_script('my_amazing_script');

⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜📈📜📜📩⛅😰📩📜📈⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜📝⛅😱🍰😱😰🐹⛅⛅⛅⛅📩📜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜📈🐹🚌😱😰😰🌓💌😱📝⛅😱🚌🙊🐵🚌⛅📜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜📜🐹📔😱😰😱🚌📦🍝🍝🐹🐹🚌🍮🐵🎊🚀📺🚌🎂⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜🐹🚌😱🌓😱🍝🍮🍱🔒🍝📦📦📦📦🍝🍝🍝🍱💼🍮😱📜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜📈🍰🍝🍰😱🚌🚌🍮🔒🐹😱😱📦📦🍝🚌📦🐹🍰🍝🍱🍱🍝🐹📜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜📈🍝🍝🍝🍮🍱🍮🍱🎊🍱🍰😱📦🍝🍝🍝🔒🚌🐹📦🍝🍧🍝🍝🚌😰⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜

<?php
/*
* Plugin Name: Theme Settings
* Version: 1
* Plugin URI: http://ieg.wnet.org/
* Description: Create a theme settings page
* Author: Alexandra White
* Author URI: http://ieg.wnet.org/blog/author/whitea/
* Requires at least: 3.6
* Tested up to: 4.2.2
@heyawhite
heyawhite / gist:c565c7faa55e54e8154a
Last active July 28, 2017 15:38
WP Transients - Full Transient Code
function wnet_get_transient_remote_json($transientname, $url, $interval=1800) {
// those are the same arguments as 'set_transient()'
$stalecachename = 'stalecache_' . $transientname;
// we generate a consistent name for the backup data
if ( false === ( $json = get_transient($transientname) ) ) {
$response = wp_remote_get($url);
// get the remote data as before, but this time...