Skip to content

Instantly share code, notes, and snippets.

@Scherlac
Scherlac / get_tds_cert.py
Last active December 23, 2025 09:22 — forked from lnattrass/get_tds_cert.py
A terrible way to connect to MS SQL Server and dump the certificate as a PEM
import sys
import pprint
import struct
import socket
import ssl
from time import sleep
# Standard "HELLO" message for TDS
prelogin_msg = bytearray([ 0x12, 0x01, 0x00, 0x2f, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x06, 0x01, 0x00, 0x20,
0x00, 0x01, 0x02, 0x00, 0x21, 0x00, 0x01, 0x03, 0x00, 0x22, 0x00, 0x04, 0x04, 0x00, 0x26, 0x00,
# run resolvconf?
RESOLVCONF=yes
# startup options for the server
OPTIONS="-u bind"
@willwm
willwm / proxmox-install.sh
Last active December 23, 2025 09:22
Fresh Proxmox Server install script
#!/bin/bash
# TODO: Remove pve-enterprise, add pve-no-subscription repo to sources.list(*)
# Update packages, install essentials
apt update
apt install -y build-essential git zsh htop
# Update Proxmox Appliance Manager (https://forum.proxmox.com/threads/no-turnkey-fresh-install-5-1-35.38199/)
pveam update
@edxeth
edxeth / claude-frontend-design-skill
Created December 21, 2025 15:45
Claude's frontend design skill
---
name: frontend-design
description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
license: Complete terms in LICENSE.txt
---
This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.

Make PowerShell Readable on a White Windows Terminal Background

When you switch Windows Terminal to a light or white background, the default PowerShell token colors can become hard to read. You can fix this by customizing PSReadLine’s color scheme so that prompts, selections, and syntax tokens use higher-contrast tones.

Below is a minimal configuration that keeps most text at the terminal’s default foreground color, uses a dim gray for numbers, and highlights selections in an inverted style. It also gives commands a warm accent for visibility.

# Run in PowerShell (requires PSReadLine)
Import-Module PSReadLine
Set-PSReadLineOption -Colors @{
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active December 23, 2025 09:18
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@anubhavshrimal
anubhavshrimal / Indian_Cities_In_States_JSON
Created March 31, 2017 09:56
JSON of Indian Cities in each of the 29 Indian States
{
"Andaman and Nicobar Islands": [
"Port Blair"
],
"Haryana": [
"Faridabad",
"Gurgaon",
"Hisar",
"Rohtak",
"Panipat",
@DartPower
DartPower / SharePoint Server 2019 Enterprise Key
Created January 24, 2023 15:23
SharePoint Server 2019 Enterprise Key
SharePoint Server 2019 Enterprise
7G7R6-N6QJC-JFPJX-CK8WX-66QW4
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active December 23, 2025 09:09
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'