Skip to content

Instantly share code, notes, and snippets.

@vaughnroyko
vaughnroyko / functions.php
Last active June 23, 2017 20:25
Advanced/Basic Menu & Workflow for Wordpress Admin
<?php
//Add in a customized Wordpress admin workflow for a simplified experience
function edit_admin_menus() {
//Set this as what ever you want the default admin landing page to be
$redirect = 'edit.php?post_type=page'; //Pages
$defaultURL = get_option( 'siteurl' ) . '/wp-admin/' . $redirect;
//Add/remove cookies/redirects
@vaughnroyko
vaughnroyko / index.html
Last active December 30, 2020 12:35
IndexedDB onbeforeunload Test
<!DOCTYPE html>
<html>
<head>
<title>IndexedDB onbeforeunload Test</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/idbwrapper/1.4.1/idbstore.min.js"></script>
<script>
var idb, i;
var testData1 = [];
var testData2 = [];
var testData3 = [];
@vaughnroyko
vaughnroyko / autoexec.cfg
Created June 28, 2015 04:23
CSGO Config
//=============// //=====================================================//
// PGUP // // | / | * | - //
// DEAGLE // // | DECOY | SMOKE | FLASH //
//-------------// //-------------|-------------|-------------|-----------//
// PGDOWN // // 7 | 8 | 9 | + //
// SCOUT // // P250/CZ | 57/TEC9 | AWP | NADES //
//=============// //-------------|-------------|-------------| HE //
// 4 | 5 | 6 | INCEND //
// P90 | FAMAS/GALIL | AUG/SG556 | MOLOTOV //
//-------------|-------------|-------------|-----------//
@vaughnroyko
vaughnroyko / functions.php
Created September 24, 2019 16:44
Defer Scripts in Wordpress
<?php
// Async/defer loading, fallback jQuery support
function modify_scripts($tag, $handle, $src) {
// The handles of the enqueued scripts we want to defer
$defer_scripts = array(
'lightlightbox',
'main'
);