Skip to content

Instantly share code, notes, and snippets.

View Danw33's full-sized avatar
🦄
🪄 ✨ 💻

Daniel Wilson Danw33

🦄
🪄 ✨ 💻
View GitHub Profile
@Danw33
Danw33 / mu-plugin-log-wp-redirects.php
Last active April 1, 2019 01:52
Danw33's Redirect Log for WordPress (mu-plugin)
<?php
/**
* Logs calls to wp_safe_redirect and wp_redirect to allow for server-side optimisation of common redirects
*
*
* @wordpress-plugin
* Plugin Name: WP Redirect Log
* Plugin URI: https://gist.github.com/Danw33/6ad3b423ca2d57ed46a1b21461c13498
* Description: Logs calls to wp_redirect and wp_safe_redirect to allow for server-side optimisation of common redirects
* Version: 1.0.0
@Danw33
Danw33 / error-handler.php
Last active March 28, 2019 22:48
Custom PHP Error Handler
<?php
/**
* Custom PHP Exception/Error Handler
*
* @see debug_error_handler
*
* @author Daniel Wilson <[email protected]>
* @since 0.0.1
*/
@Danw33
Danw33 / eu_cookie_banner.js
Created November 8, 2018 14:32 — forked from bavington/eu_cookie_banner.js
Simple EU Cookie Law Banner JavaScript
@Danw33
Danw33 / git2go-checkout-branch.go
Created May 11, 2018 14:48 — forked from danielfbm/git2go-checkout-branch.go
How to do a git checkout branch using git2go
package main
import (
"errors"
"log"
"github.com/libgit2/git2go"
)
func checkoutBranch(repo *git.Repository, branchName string) error {
checkoutOpts := &git.CheckoutOpts{
@Danw33
Danw33 / install.sh
Last active February 18, 2022 22:49
macOS Homebrew Install FFMPEG --with all options
brew install ffmpeg --with-chromaprint --with-fdk-aac --with-fontconfig --with-freetype --with-frei0r --with-game-music-emu --with-libass --with-libbluray --with-libbs2b --with-libcaca --with-libgsm --with-libmodplug --with-libsoxr --with-libssh --with-libvidstab --with-libvorbis --with-libvpx --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-opus --with-rtmpdump --with-rubberband --with-schroedinger --with-sdl2 --with-snappy --with-speex --with-tesseract --with-theora --with-tools --with-two-lame --with-wavpack --with-webp --with-x265 --with-xz --with-zeromq --with-zimg
@Danw33
Danw33 / states_hash.json
Created April 25, 2016 12:21 — forked from mshafrir/states_hash.json
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
@Danw33
Danw33 / D62083D0.asc
Last active April 20, 2016 09:31
PGP Key for Daniel Wilson - D62083D0 - https://danw.io/dan.pgp.pub.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: PGP for Daniel Wilson - https://danw.io/dan.pgp.pub.asc
mQINBFOS9bMBEAC2EluJTsjKHIeks+1Rt5ci3XU3hR/RjjLYQppcGZDKToDO5Jz2
LE4lqcLfaDkJejtpD2U6VBrFGgzISP57NlANBMgmaNdes8LSVcCj0ClGyYk453cQ
LRYAW+oagOPV8cEobh+Lj4A1f29Utj/YCx3E8KTtQwb4y6nwZm9x9xX//67QzpTt
K3PAxevWvsYW1GBqwzjDw7XhTjAiwRfJ8grjRTC8zygpbBTpuPPf6hMRI+iZahVk
WERq478UN559jP4lg5ufjLefASfoCr8JnFB5+GaD2PavX/anA5aNfmu7EmDolt4l
8088vAD28d5RiR6d6YwXBhPRxNwcGvL2TIumdpGaLd67wNWEy2hLpX3i3HMIJdPW
dzvh979Cwbqo3G5FbrDRAzkZqjVIfWjzmec251umhIFULaeU87F7ipSYPi+92KMg
@Danw33
Danw33 / mofomenu.css
Created April 14, 2015 15:44
Mo Fo Menu
.nav-trigger-case .collapsed {
right: 1%;
}
@Danw33
Danw33 / D62083D0.asc
Created January 21, 2015 12:46
Public Key (D62083D0)
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: GPGTools - https://gpgtools.org - http://danw.io
mQINBFOS9bMBEAC2EluJTsjKHIeks+1Rt5ci3XU3hR/RjjLYQppcGZDKToDO5Jz2
LE4lqcLfaDkJejtpD2U6VBrFGgzISP57NlANBMgmaNdes8LSVcCj0ClGyYk453cQ
LRYAW+oagOPV8cEobh+Lj4A1f29Utj/YCx3E8KTtQwb4y6nwZm9x9xX//67QzpTt
K3PAxevWvsYW1GBqwzjDw7XhTjAiwRfJ8grjRTC8zygpbBTpuPPf6hMRI+iZahVk
WERq478UN559jP4lg5ufjLefASfoCr8JnFB5+GaD2PavX/anA5aNfmu7EmDolt4l
8088vAD28d5RiR6d6YwXBhPRxNwcGvL2TIumdpGaLd67wNWEy2hLpX3i3HMIJdPW
dzvh979Cwbqo3G5FbrDRAzkZqjVIfWjzmec251umhIFULaeU87F7ipSYPi+92KMg
@Danw33
Danw33 / keybase.md
Created January 21, 2015 11:22
Keybase Github Proof

Keybase proof

I hereby claim:

  • I am danw33 on github.
  • I am danw33 (https://keybase.io/danw33) on keybase.
  • I have a public key whose fingerprint is 1C6E 2273 D397 06CC 48EF A543 1C76 31C7 D620 83D0

To claim this, I am signing this object: