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
@killshot13
killshot13 / README.md
Last active April 23, 2021 17:50
Custom README template
@killshot13
killshot13 / common.md
Last active August 14, 2022 13:32
bash_scripts

common.md

Documents scripts that a developer might have need to run frequently. Includes all functions from ~/.bash_functions, along with any related aliases.

Table of Contents

  1. cl() — Combines the cd and ls commands into one; adds a trailing slash to directories making them easier to identify in no-color terminals.

@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",
@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 / network.ps1
Last active December 3, 2024 22:16
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 / 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 / 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 / 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 / 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 / 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