Skip to content

Instantly share code, notes, and snippets.

@BrentOzar
BrentOzar / TopQueries.sql
Last active December 22, 2025 09:54
Some of the top StackOverflow queries from http://data.stackexchange.com. Great for demoing wide SELECT workloads.
USE StackOverflow;
GO
IF OBJECT_ID('dbo.usp_Q7521') IS NULL
EXEC ('CREATE PROCEDURE dbo.usp_Q7521 AS RETURN 0;')
GO
ALTER PROC dbo.usp_Q7521 @UserId INT AS
BEGIN
/* Source: http://data.stackexchange.com/stackoverflow/query/7521/how-unsung-am-i */
@GeorgeHernandez
GeorgeHernandez / TreeCharacters.md
Last active December 22, 2025 09:49
Characters used to represent trees like directories and files.

Tree Characters

No, I'm not talking about Treebeard. Rather, I'm talking about characters that can be used to represent tree structures, especially directories and files in directory structures.

In graph theory, a tree graph a tree is an undirected graph in which any two vertices (nodes like directories and files) are connected by exactly one (1..1) path, or equivalently a connnected acyclic undirected graph. The connections are edges (aka links or lines).

The examples below will represent the following tree (listed in alphabetical order):

root/
@123DMWM
123DMWM / fullbridge.cs
Last active December 22, 2025 09:49
MCGalaxy Plugin to Bridge IRC and Discord as it currently does not show one to the other.
using MCGalaxy.Modules.Relay;
using MCGalaxy.Modules.Relay.IRC;
using MCGalaxy.Modules.Relay.Discord;
namespace MCGalaxy {
public class FullBridge : Plugin {
public override string creator { get { return "123DontMessWitMe"; } }
public override string MCGalaxy_Version { get { return "1.9.3.4"; } }
public override string name { get { return "FullBridge"; } }
@RobotHanzo
RobotHanzo / script.js
Last active December 22, 2025 09:49
中華電信512NP 路由器cht帳號工程師QR驗證bypass
// ==UserScript==
// @name CHT QR bypass
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Bypasses cht account QR OTP verification of CHT's 512NP router
// @author RobotHanzo
// @match https://192.168.1.1/*
// @grant none
// @run-at document-start
// ==/UserScript==
@jc-torresp
jc-torresp / access-pi-anywhere.md
Created September 21, 2019 05:12
Configuration to access Raspberry Pi from anywhere with UPnP port forwarding

Access Raspberry Pi from anywhere

Dynamic DNS

We need to use so called Dynamic DNS (DDNS) to create and dynamically update a mapping between a chosen domain name and an “external” IP address of our Raspberry Pi (i.e. router IP address).

  • Look for a DDNS provider.
  • Register a new user account.
  • Choose a desire domain name.
  • Configure it on router.
@miguelmota
miguelmota / print_stderr.go
Created April 11, 2021 21:04
Golang print to stderr using fmt
package main
import (
"fmt"
"os"
)
func main() {
fmt.Fprintf(os.Stderr, "print to stderr")
}
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@nachoparker
nachoparker / git-forget-blob.sh
Last active December 22, 2025 09:35
Completely remove a file from a git repository with git-forget-blob
#!/bin/bash
# Completely remove a file from a git repository history
#
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
#
# Usage:
# git-forget-blob file_to_forget
#
# Notes:
@baidshreya2002-a11y
baidshreya2002-a11y / checklist.md
Created December 22, 2025 09:33
checklist for tonight's harbor shift operations

check dock safety and lighting Confirm staff assignment record vessel arrivals and departures

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 22, 2025 09:32
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter: