Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexandra White heyawhite

View GitHub Profile
@heyawhite
heyawhite / heyawhite-speaker-policy.md
Last active Aug 27, 2020
Alexandra White's speaking policy
View heyawhite-speaker-policy.md
@heyawhite
heyawhite / keybase.md
Created Jul 20, 2018
Keybase validation
View keybase.md

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 Dec 18, 2017
Create an Ubuntu infrastructure sandbox and add Docker tools
View prometheus-sandbox.md

Create a Prometheus instance within an infrastructure container

Get into your Triton environment

$ eval "$(triton env)"

Create an ubuntu infrastructure container

View basic-style.css
/************************************************************
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,
View 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>
View enqueue-scripts-on-wp.php
<?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');
View ⬜👸📜.md




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

View aw-theme-options.php
<?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 Jul 28, 2017
WP Transients - Full Transient Code
View gist:c565c7faa55e54e8154a
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...
@heyawhite
heyawhite / gist:a6fcb0198e462946b004
Last active Aug 29, 2015
WP Transients - Chartbeat
View gist:a6fcb0198e462946b004
$sidebar_popular_chartbeat = wnet_get_transient_remote_json('sidebar_popular_chartbeat', 'http://api.chartbeat.com/live/toppages/v3/?apikey=XXXXX&host=yourwebsite.com', 600);