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 / settings.jsonc
Last active December 25, 2024 05:11
vscode-colorized-brackets
{
// Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.
"editor.bracketPairColorization.enabled": true,
// Controls whether the editor should render indent guides.
"editor.guides.indentation": true,
// Controls whether bracket pair guides are enabled or not.
// - true: Enables bracket pair guides.
// - active: Enables bracket pair guides only for the active bracket pair.
// - false: Disables bracket pair guides.
"editor.guides.bracketPairs": "active",
@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 / her-os1-loading.markdown
Created April 15, 2022 17:29
Her - OS1 Loading

Her - OS1 Loading

Loading animation based on movie "Her" - OS1.

  • Mouse or Finger press on the page to finish loading action.

A Pen by Michael R. on CodePen.

License.

@killshot13
killshot13 / pandoc-install-intro.md
Last active October 23, 2024 01:49
A guide to installing and configuring Pandoc on the Windows & the Linux OS.

What is Pandoc?

Pandoc is open-source software used to transform various filetypes such as .md into more user-friendly filetypes including .pdf, .docx, and .html.

@killshot13
killshot13 / .wslconfig
Last active September 4, 2024 12:09
My personal configuration files [.wslconfig & wsl.conf] for Windows Subystem for Linux 2. These example do contain all of the most recent options for said files, but do not represent the default values in each situation. (asterisk = only available on Win 11)
[wsl2]
# An absolute Windows path to a custom Linux kernel.
# kernel=The Microsoft built kernel provided inbox (default)
# How much memory to assign to the WSL 2 VM, this can be set as whole numbers using GB or MB. Default is 50% of total memory on Windows or 8GB, whichever is less; formerly 80% of total memory on Windows.
memory=5700MB
# How many logical processors to assign to the WSL 2 VM.
# processors=The same number of logical processors on Windows (default)
@killshot13
killshot13 / pokemon.txt
Last active March 16, 2024 10:18
The names of all 1025 species of Pokémon currently known to exist, formatted as a wordlist to be used for password cracking
bulbasaur
ivysaur
venusaur
charmander
charmeleon
charizard
squirtle
wartortle
blastoise
caterpie
@killshot13
killshot13 / FullyStructuredReactFormControlledFinal.jsx
Last active July 2, 2023 20:41
React Forms: Controlled vs. Uncontrolled Components w/ Examples
// @ts-nocheck
import axios from 'axios'
import React, { useReducer, useState } from 'react'
const formReducer = (state, event) => {
if (event.reset) {
return {
name: '',
email: '',
tel: '',
@killshot13
killshot13 / forwardRef.jsx
Last active February 4, 2023 01:28
React useRef && forwardRef
// sample use case: scroll to a React component by using a reference.
import React, { forwardRef, useRef } from 'react'
// @ts-ignore
const Article = forwardRef(function Article({ onClick }, ref) {
return (
<article ref={ref}>
<h1>A React article for Latin readers</h1>
// Rest of the article's content...
<button onClick={onClick}>Back to the top</button>
@killshot13
killshot13 / settings.jsonc
Last active January 12, 2023 19:21
todo-tree-config
{
// If true, any subfolders containing a .git file will be ignored when searching.
"todo-tree.filtering.ignoreGitSubmodules": true,
// Add VSCode's `files.exclude` and/or `search.exclude` list to the ignored paths.
// - none: Don't used any built in excludes
// - file excludes: Use the Files:Exclude setting
// - search excludes: Use the Search:Exclude setting
// - file and search excludes: Use the Files:Exclude and the Search:Exclude setting
"todo-tree.filtering.useBuiltInExcludes": "file and search excludes",
// Set to true to enable automatic updates when files in the workspace are created, changed or deleted.
@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):