Skip to content

Instantly share code, notes, and snippets.

View rnemeth90's full-sized avatar

Ryan Nemeth rnemeth90

View GitHub Profile
@rnemeth90
rnemeth90 / go-stdlib-interface-selected.md
Created December 19, 2023 13:24 — forked from asukakenji/go-stdlib-interface-selected.md
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@rnemeth90
rnemeth90 / gist:c432b3700dad76b2a2a32bac36540aab
Created June 13, 2022 18:50
Get Pod Capacity for Kubernetes Node
kubectl get nodes -o=custom-columns=NAME:.metadata.name,CAPACITY:.status.capacity.pods
@rnemeth90
rnemeth90 / program.cs
Created April 28, 2022 17:25
Get HostName Extended File Attribute using C# and Powershell
using System.Diagnostics;
string path = @"C:\Path\to\your\file.txt";
ProcessStartInfo processInfo = new ProcessStartInfo();
processInfo.FileName = @"powershell.exe";
processInfo.Arguments = $@"-Command $ErrorActionPreference = 'Stop'; $VerbosePreference = 'Continue'; $ProgressPreference = 'SilentlyContinue';
$fi = Get-ItemProperty -Path '{path}';
$ShellApplication = New-Object -ComObject Shell.Application;
$ShellFolder = $ShellApplication.Namespace($fi.Directory.FullName);
@rnemeth90
rnemeth90 / gist:e83bb4c8808f0d28412cb40edb2487d3
Created April 6, 2022 19:43
Delete Terminating Kubernetes Namespaces with Bash
#!/bin/bash
namespaces=$(kubectl get ns --field-selector=status.phase==Terminating -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}')
if [ -z "$namespaces"]
then
echo "No namespaces to delete."
exit
else
for namespace in $namespaces
@rnemeth90
rnemeth90 / gist:19d7de622a5009c1cf908c5d4deb5358
Created April 6, 2022 19:41
Delete Terminating Kubernetes Namespaces with Powershell
$terminatingNamespaces = kubectl get ns --field-selector=status.phase==Terminating -o jsonpath="{range .items[*]}{.metadata.name}{'\n'}{end}"
foreach ($ns in $terminatingNamespaces) {
Write-Verbose '[FOUND]: Forcefully removing $ns'
$jsonObj = kubectl get namespace $ns -o json | ConvertFrom-Json | foreach-object { $_.spec.finalizers = @(); $_ } |
convertto-json | kubectl replace --raw /api/v1/namespaces/$namespace/finalize -f -
}
@rnemeth90
rnemeth90 / GoogleDorking.md
Created March 23, 2022 15:38 — forked from sundowndev/GoogleDorking.md
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@rnemeth90
rnemeth90 / README-Template.md
Created January 28, 2022 01:00 — forked from DomPizzie/README-Template.md
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started

@DomPizzie
DomPizzie / README-Template.md
Last active June 20, 2025 02:06
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started