Skip to content

Instantly share code, notes, and snippets.

View Noxsios's full-sized avatar

razzle Noxsios

View GitHub Profile
@Noxsios
Noxsios / setipcmd.bat
Last active September 13, 2020 13:26
Batch file to change computer IP
@ECHO OFF
ECHO.
ECHO Choose an IP configuration option:
ECHO [1] Set Custom
ECHO [2] DHCP
ECHO [3] DEVICE 1
ECHO [4] DEVICE 2
ECHO [5] Exit
ECHO.
:choice
@Noxsios
Noxsios / Set-IP-GUI.ps1
Last active March 26, 2022 22:25
PowerShell GUI for IP Address Management
#Requires -RunAsAdministrator
<#
Script made by Noxsios
This script displays a GUI for rapidly / easily changing your computer's IP address
WARNING: ONLY RUN THIS SCRIPT ON APPROVED CONFIG LAPTOPS
Last update: Nov 8 2020
#>
@Noxsios
Noxsios / Get-WiFiProfiles.ps1
Last active September 25, 2023 22:40
Get-WiFi-Profiles using netsh and store in a TOML file for easy reading.
if (!(Test-Path "./profiles.toml")) {
New-Item -ItemType File "./profiles.toml" | Out-Null
}
"#####`n[profiles]" | Out-File -Append -Encoding utf8 "./profiles.toml"
(netsh wlan show profiles) |
Select-String "\:(.+)$" |
ForEach-Object {
$name = $PSItem.Matches.Groups[1].Value.Trim()
@Noxsios
Noxsios / Write-Typewriter.ps1
Created July 25, 2021 20:20
Fancy typewriter function to add flair to Write-Host
function Write-Typewriter {
[CmdletBinding()]
param (
[Parameter(ValueFromPipeline)]
[string]$Text,
[Parameter()]
[ConsoleColor]$Color = [ConsoleColor]::Green,
[Parameter()]
[int]$Delay = 200,
[Parameter()]
// Inspired by https://github.com/hugomd/parrot.live
// This runs in a Cloudflare worker.
const brown = "\u001b[38;5;94m";
const green = "\u001b[38;5;28m";
const reset = "\u001b[0m";
const frames = [
`
::::::::::::

Brewfile explained

My current Brewfile explained. Some entries (like gcc) are omitted because they are self explanatory, while others (like helm) are omitted because they are much more commonly known. This leaves, lesser known and hopefully helpful programs. Enjoy!

For all my tools I like using the macchiato color scheme from catpuccin

func (p *Packager) updateComponentImagesInplace(index int, images []string, cm goyaml.CommentMap) error {
component := p.cfg.Pkg.Components[index]
for imageIdx, image := range component.Images {
commentsPath := fmt.Sprintf("$.components[%d].images[%d]", index, imageIdx)
imageComments := cm[commentsPath]
left, err := transform.ParseImageRef(image)
if err != nil {
return err
#!/bin/bash
# Directory containing the Go files
DIRECTORY="."
# Array of paths to exclude from the check
EXCLUDE_PATHS=(
"./path/to/directory/exclude1"
"./path/to/directory/exclude2"
)
--- main.go ---
type Lease struct {
AccountID string
}
type PageData struct {
Leases []Lease
AvailableAccounts []string
}
import io.grpc.ManagedChannelBuilder
import io.grpc.stub.StreamObserver
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import org.apache.commons.compress.archivers.tar.TarArchiveEntry
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream
import java.io.*
import java.nio.file.Files
import java.nio.file.Path