Skip to content

Instantly share code, notes, and snippets.

View sushidub's full-sized avatar

jgraston sushidub

View GitHub Profile
@sushidub
sushidub / wp-scripts.md
Last active April 8, 2018 16:13
Full list of registered javascript libraries that come with Wordpress [4.9.4]

NOTE: Its a quick cut/copy/paste job for ref. There might be a a few strays in here that aren't part of the WP list (let me know and I'll remove)


  • utilscommon
  • wp-a11y
  • sack
  • quicktags
  • colorpicker
  • editor
  • wp-fullscreen-stub
@sushidub
sushidub / color_hack-1
Last active April 10, 2018 04:13
Reduce any color by the following to get a decent less saturated monochromatic value
Reduce any color by the following to get a decent less saturated monochromatic value
Easiest way is to grab the HSL values of the original color then multiply by the following percentages:
Saturation —> 28%
Value —> 72%
@sushidub
sushidub / apache-conf-helpers.md
Last active May 16, 2018 14:20
Apache server scripts I find useful

/http.conf

ErrorLogFormat "\n\n\n______________[%{cu}t] \tLocal: %A \tClient: %a \n\tMessage: %M\n\tModule: %m\n\tLevel: %l\n\tSource: %F\n\tReferer: %{Referer}i\n\n\n"

Combine the above with an error log stream while performing work...

#!/bin/sh
@sushidub
sushidub / wp-admin-globals.md
Last active September 12, 2018 05:55
wordpress admin globals

helpful wordpress admin globals available via the window object

var adminScreen = {};
adminScreen.pagenow = window.pagenow;
adminScreen.adminpage = window.adminpage;
adminScreen.typenow = window.typenow;

console.log(adminScreen);
@sushidub
sushidub / wp-auto-update-settings.md
Last active October 11, 2018 18:48
How to avoid Wordpress automatic updates

Wordpress Automatic Update settings

Paste the following into wp-config.php just above the /* That's all, stop editing! Happy blogging. */ comment at bottom of file. Uncomment whichever of the following rules you want automatic updates from Wordpress to follow.

// =========================
// Blanket disable every single type of automatic update
// =========================
// define( 'AUTOMATIC_UPDATER_DISABLED', true );
@sushidub
sushidub / certbot-renew.md
Last active February 25, 2019 10:12
AWS EC2 / Certbot / Fix for the Certbot renewal module missing error

Original Issue/Fix

Lately when running certbot renew on my AWS Linux instance produces the following error:

Error: couldn't get currently installed version for /opt/eff.org/certbot/venv/bin/letsencrypt: 
Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 7, in <module>
    from certbot.main import main
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/main.py", line 10, in <module>
@sushidub
sushidub / RGB-HSL-HSV.md
Last active July 19, 2019 23:06
RGB | HSL | HSV | Javascript conversions
/**
 * Converts an RGB color value to HSL. Conversion formula
 * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
 * Assumes r, g, and b are contained in the set [0, 255] and
 * returns h, s, and l in the set [0, 1].
 *
 * @param   Number  r       The red color value
 * @param   Number  g       The green color value
@sushidub
sushidub / INSTALL.md
Last active April 27, 2022 17:40
Building source files using MAKE (autoconf). A readable description and instructions on configuration mechanics (e.g. ./configure).

Installation Instructions


Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind.

@sushidub
sushidub / Build-Notes.md
Last active March 26, 2020 04:16
Notes and quotes on building from source files

When using a gcc based toolchain, be mindful that you should have the autotools installed (autoconf, automake) and will need to run either ./autogen.sh or ./bootstrap.sh to produce the configure file.

The difference between autogen.sh and bootstrap.sh is that the former invokes configure with a default set of options, and will therefore generate a Makefile, whereas the latter does not invoke configure at all. If using autogen.sh, note that you can also append options, that will be passed as is to configure.

source: https://github.com/libusb/libusb/blob/master/README.git

@sushidub
sushidub / Make-VSCode-Project.md
Last active January 12, 2021 15:43
Setup and launch a new VSCode project (workspace) from macOS Finder with one click. Workspace/Project name is derived from the selected folder the action is run against.

Requirements

macOS Automator bin/bash (or any command line flavor that supports printf) VSCode

Installation

  • Download the .workflow file (via Dropbox, and don't worry its code signed)

  • Open Automator - import/open the .workflow file - resave to username/Library/Services folder — or do it all via terminal