Skip to content

Instantly share code, notes, and snippets.

@asears
asears / kdiff3-config.md
Created November 2, 2024 12:57 — forked from JeffMill/kdiff3-config.md
kdiff3 configuration for Windows

KDiff3

Fast on Linux and Windows, and supports 3-way merging! Diffinity and Meld are a couple of other viable options.

KDiff3 Merge Tutorial

Install KDiff3

winget install KDE.KDiff3
@asears
asears / ripgrep-cheat-sheet.md
Created November 2, 2024 12:50
RipGrep (rg) Cheat Sheet
Command Description
rg pattern Search pattern in current dir recursively
rg pattern utils.py Search in a single file utils.py
rg pattern src/ Search in dir src/ recursively
rg '^We' test.txt Regex searching support (lines starting with We)
rg -F '(test)' Search literally, i.e., without using regular expression
rg -i pattern Search pattern and ignore case (case-insensitive search)
rg -S pattern Smart case search (match case of pattern)
rg pattern -g '*.py' File globbing (search in certain files), can be used multiple times
@JeffMill
JeffMill / windows_build.md
Last active November 2, 2024 11:36
Windows build environment using cmake and Visual Studio Build Tools

Windows build environment using cmake, vcpkg, Visual Studio Build Tools

Installation

App Installer (winget)

This is included in Windows 11.

Downlevel: In Microsoft Store, Install "App Installer" (aka winget)

"""
Toy demonstration of chain-of-thought and consensus prompting using OpenAI API.
© Riley Goodside 2022
"""
import os
import re
from statistics import mode
@nateraw
nateraw / stable_diffusion_walk.py
Created August 18, 2022 05:59
Walk between stable diffusion text prompts
"""
Built on top of this gist by @karpathy:
https://gist.github.com/karpathy/00103b0037c5aaea32fe1da1af553355
stable diffusion dreaming over text prompts
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stable_diffusion_walk.py --prompts "['blueberry spaghetti', 'strawberry spaghetti']" --seeds 243,523 --name berry_good_spaghetti
@pinakighatak
pinakighatak / AzFunctionsDeploy.bicep
Created March 21, 2022 20:10
Azure Functions Deployment with Bicep
// ****************************************
// Azure Bicep main template
// This bicep template demonstrates provisioning Azure function that implements OpenAPI specifications.
// Optinally this Azure Function endp-point can be published to an existing API Management - witin a Product
// Last Update : 17-Feb-2022
// ****************************************
targetScope = 'resourceGroup'
param functionRuntime string = 'dotnet'
param logAnalyticsWorkspaceName string = 'la-${uniqueString(resourceGroup().id)}'
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active April 28, 2025 21:31
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
$subscription = 'dd0d4271-9b26-4c37-a025-1284a43a4385';
$observations = @{};
foreach ($resourceGroupName in @('taskcluster-staging-workers-us-central')) {
$observations[$resourceGroupName] = @{};
while (($vms = @(Get-AzVm -ResourceGroupName $resourceGroupName -Status)) -or ($vms.Length -gt 0)) {
Write-Output -InputObject ('{0} virtual machines observed in {1}' -f $vms.Length, $resourceGroupName);
foreach ($vm in $vms) {
$name = $vm.Name;
if (-not $observations[$resourceGroupName].ContainsKey($name)) {
$observations[$resourceGroupName][$name] = @{};
@kentcdodds
kentcdodds / package.json
Last active November 20, 2024 12:27
setup script for my workshops
{
"name": "workshop-setup",
"version": "1.0.0",
"description": "This is the common setup script for most of my workshops",
"bin": "./setup.js"
}