Skip to content

Instantly share code, notes, and snippets.

merge into vimeo.video t
using (
select
t.record_content:op::text as op
-- for the 'd' case, the 'id' will only come through in the 'before' section
, coalesce(t.record_content:before.id::integer, t.record_content:after.id::integer) as id
, t.record_content:after.user_id::integer as user_id
, t.record_content:after.video_title::text as video_title
, to_timestamp_tz(t.record_content:after.created_at::integer, 3) as created_at
@Kestrer
Kestrer / how-to-write-hygienic-macros.md
Created October 17, 2020 05:35
A guide on how to write hygienic Rust macros

How to Write Hygienic Rust Macros

Macro hygiene is the concept of macros that work in all contexts; they don't affect and aren't affected by anything around them. Ideally all macros would be fully hygienic, but there are lots of pitfalls and traps that make it all too easy to accidentally write unhygienic macros. This guide attempts to provide a comprehensive resource for writing the most hygienic macros.

Understanding the Module System

First, a little aside on the details of Rust's module system, and specifically paths; it is

@AndrewMast
AndrewMast / disable_vanguard.vbs
Last active May 6, 2024 17:25
Commands to disable Riot Vanguard when you aren't playing Valorant
' Disables Vanguard from starting when you boot your computer
Call CreateObject("Shell.Application").ShellExecute("cmd.exe", "/c ""sc config vgc start= disabled & sc config vgk start= disabled""", "", "runas")
@vwkd
vwkd / michael-burry-msn-articles.md
Last active May 6, 2024 17:24
Most Michael Burry MSN MoneyCentral articles. See comments in source for articles that weren't available in the Wayback Machine or might be missing.

MSN MoneyCentral - Strategy Lab - Value Doc - Dr. Michael Burry

Michael operates on out-of-favor industries to find best-of-breed companies trading at steep discounts.

Michael focuses on free cash flow and private market valuation as he scours out-of-favor industries and overlooked securities.

@MadeBaruna
MadeBaruna / README.md
Last active May 6, 2024 17:24
Get Genshin Impact wish history link
Usage:
single:
minecraft://?argument=value
or multiple:
minecraft://?argument=value&argument2=value2
@sunmeat
sunmeat / main.cpp
Last active May 6, 2024 17:22
one server multiple clients C++ example (TCP)
CLIENT SIDE:
#define WIN32_LEAN_AND_MEAN
#include <ws2tcpip.h>
#include <windows.h>
#include <iostream>
#include <string>
using namespace std;
@juliusmarminge
juliusmarminge / enum-generator.ts
Last active May 6, 2024 17:22
prisma enum generator
import { generatorHandler } from "@prisma/generator-helper";
import fs from "node:fs/promises";
import path from "node:path";
const header = `// This file was generated by a custom prisma generator, do not edit manually.\n`;
generatorHandler({
onManifest() {
return {
defaultOutput: "./enums/index.ts",
@GOROman
GOROman / CRSFProtocol.md
Last active May 6, 2024 17:20
ExpressLRS / CRSF Protocol 解析メモ
@endofcake
endofcake / Dockerfile
Last active May 6, 2024 17:20
Copy *.csproj files during a docker build, preserving the directory structure (kudos to @aidansteele)
COPY src/*/*.csproj ./
RUN for file in $(ls *.csproj); do mkdir -p ${file%.*}/ && mv $file ${file%.*}/; done