Skip to content

Instantly share code, notes, and snippets.

View killshot13's full-sized avatar
Working remotely

Michael R. killshot13

Working remotely
View GitHub Profile

Keybase proof

I hereby claim:

  • I am killshot13 on github.
  • I am killsh0t_13 (https://keybase.io/killsh0t_13) on keybase.
  • I have a public key ASBjQ84QUPSvrigNuj4yUw-LyW3308svcrDkCk2iZl4Lgwo

To claim this, I am signing this object:

@killshot13
killshot13 / README.md
Last active January 12, 2022 06:23
Six general functions that will maximize the usefulness of the WP Settings API

Settings API Functions

(1) Use this gist to reference the principal applications of the Settings API provided by WordPress as an aid to website and plugin development.

(2) There are six primary functions that allow you to maximize the benefits of the Settings API.

(3) A list of the function parameters and a brief description of each follows after.

A good point of reference to further build out your options page is David's exhaustive PressCoders article.

@killshot13
killshot13 / linux_snippets.md
Last active June 21, 2021 21:27
Linux Terminal Snippets (randomCollection)

Linux Terminal Snippets

one-liners

(randomCollection)


Reference Guide 2 $ymbols / -root directory

@killshot13
killshot13 / ps1_script.md
Last active February 25, 2022 13:52
Fix for WSL2 localhost access issue

ps1_script

$hostname = "wsl"

# find ip of eth0
$ifconfig = (wsl -- ip -4 addr show eth0)
$ipPattern = "((\d+\.?){4})"
$ip = ([regex]"inet $ipPattern").Match($ifconfig).Groups[1].Value
if (-not $ip) {
@killshot13
killshot13 / README.txt
Last active October 5, 2021 09:52
useful-reply-templates
Resuable templates for GitHub discussions, collegiate disucssion board posts, LinkedIn recruiters, and more.
All items may be reproduced, modified, and repurposed by anyone wishes to do so.
@killshot13
killshot13 / windows_snippets.md
Last active December 14, 2022 02:19
PowerShell Snippets

PowerShell Snippets

A quick reference to copypasta useful PowerShell commands. (randomCollection)

one-liners


1.) Identify & Kill a Process Listening on a Given Port (assuming PORT 5000 and PID 348):

@killshot13
killshot13 / express-smtp-mailer.txt.md
Created February 27, 2021 17:03
express-smtp-mailer.txt

Cover Photo Link

How To Build an SMTP Mail Server with Express, Node, and Gmail

tutorial, node, javascript, webdev

@killshot13
killshot13 / network.ps1
Last active July 3, 2021 14:22
wsl2 port-forwarding PowerShell script
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
$arguments = "& '" + $myinvocation.mycommand.definition + "'"
Start-Process powershell -Verb runAs -ArgumentList $arguments
Break
}
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
@killshot13
killshot13 / benchmarks.md
Last active June 29, 2021 02:09
Reference Guide for Responsive Images on Websites

Responsive Image Benchmarks

Compression

No image should exceed 500 KB (.5MB) in overall size.

  • JPEG Compression -- 60-70% of original image quality is the target range. Tolerance allows for adjustments as needed for your specific .jpg/.jpeg files.

  • Be sure to compare at realistic sizing and maintain correct L <-> W ratio.

@killshot13
killshot13 / logview_template.md
Last active April 19, 2021 04:19
Logview_Template

Log Viewer Template

Use with Log Viewer extension for VS Code

{
    "logViewer.watch": [
        {
 "title": "Demo App",