Skip to content

Instantly share code, notes, and snippets.

@cayter
cayter / repository.ts
Last active April 18, 2024 12:23
Drizzle ORM Type-Safe Repository With PgTable
import { startSpan } from "@sentry/remix";
import type { StartSpanOptions } from "@sentry/types";
import {
type AnyColumn,
type AnyTable,
type BuildQueryResult,
type DBQueryConfig,
type DrizzleTypeError,
type Equal,
type ExtractTablesWithRelations,

rank by height:

  1. mid (mid-mount)
  2. flat (flat mount, non-angled insertion)
  3. low
  4. med
  5. tall

low, med and tall are likely angled insertion - I don't check that, but it's reasonable to assume. The lines between low, med and tall are blurred, don't expect consistency - look for specific height values if you need them (and make a PR if you can, I'd appreciate it!) For mid-mount, smd+tht means inner row pins are THT - otherwise, inner row pins are SMD, which might be noticeably harder to rework.

@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active April 18, 2024 12:22
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@eiselekd
eiselekd / enableDCI.txt
Last active April 18, 2024 12:22
Enable DCI debugging on Gigabyte-BKi5HA-7200
Enable DCI debugging on Gigabyte-BKi5HA-7200
--------------------------------------------
The Gigabyte-BKi5HA-7200 (Kabylake i5-7200 processor) can be debugged with only a USB debug cable, a
special cable that crosses only the data signals and has the power signals
removed. You can buy these cables at i.e. https://www.datapro.net/products/usb-3-0-super-speed-a-a-debugging-cable.html
The hurdle you have to overcome before you can access DCI however is that you
need to set some bits in hardware that first enable DCI and also enable the debug port so that DCI can control the cores.
There are lots of guides in howto patch the BIOS but only these two really describes all the steps using only freely accessible tools:
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active April 18, 2024 12:22
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%'
@qoomon
qoomon / conventional_commit_messages.md
Last active April 18, 2024 12:17
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@noraj
noraj / gulp-cjs-to-esm.md
Last active April 18, 2024 12:13
Moving gulpfile from CommonJS (CJS) to ECMAScript Modules (ESM)

Moving gulpfile from CommonJS (CJS) to ECMAScript Modules (ESM)

Context

del v7.0.0 moved to pure ESM (no dual support), which forced me to move my gulpfile to ESM to be able to continue to use del.

The author sindresorhus maintains a lot of npm packages and does not want to provides an upgrade guide for each package so he provided a generic guide. But this guide is a bit vague because it's generic and not helping for gulp, hence this guide.

Guide

@mmngreco
mmngreco / py2mermaid.py
Last active April 18, 2024 12:10
[mermaid] classDiagram builder from python code
r"""
This requires to have the library (pkg) pre-installed.
Usage:
$ python ./py2mermaid.py --pkg pandas
$ python ./py2mermaid.py --pkg pandas --base-module pandas.core
$ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core
$ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core --raw | sed "s/\w\.\(\w\)/\U\1/g"
Note: based on https://gist.github.com/Zulko/e0910cac1b27bcc3a1e6585eaee60121
@CaptainVincent
CaptainVincent / README.md
Last active April 18, 2024 12:08
Improve your vscode quickinput-widget

Customize your quickinput-widget

This is a small tool designed to emulate the Sublime style Command Palette as follows.

Screenshot

It requires the use of a specific extension to load the js file from this gist.

I'm using the APC extension, and the usage is as follows.

@MuhammadSaim
MuhammadSaim / rarreg.key
Last active April 18, 2024 12:07
Step 1: Create a file called rarreg.key Step 2: Paste into the file the raw content of this gist Step 3: Go to Winrar install directory (by default => c:\ProgramFiles\WinRAR\ ) Step 4: Paste the rarreg.key into WinRAR directory Step 5: Enjoy
RAR registration data
WinRAR
Unlimited Company License
UID=4b914fb772c8376bf571
6412212250f5711ad072cf351cfa39e2851192daf8a362681bbb1d
cd48da1d14d995f0bbf960fce6cb5ffde62890079861be57638717
7131ced835ed65cc743d9777f2ea71a8e32c7e593cf66794343565
b41bcf56929486b8bcdac33d50ecf773996052598f1f556defffbd
982fbe71e93df6b6346c37a3890f3c7edc65d7f5455470d13d1190
6e6fb824bcf25f155547b5fc41901ad58c0992f570be1cf5608ba9