Skip to content

Instantly share code, notes, and snippets.

@vtenq
vtenq / git-workflow.md
Last active April 19, 2024 07:53
Git workflow with conventional commits and semantic auto release

Git workflow with conventional commits and semantic auto release

This is an adoptation of Git flow by Vincent Driessen with conventional commits and semantic release.

The main concepts

At the core, the development model is greatly inspired by existing models out there. The central repo holds two main branches with an infinite lifetime:

@leonbora167
leonbora167 / Paddle_OCR_Training.ipynb
Last active April 19, 2024 07:53
Steps for training Detector and Recognizer of PaddleOCR
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cayter
cayter / repository.ts
Last active April 19, 2024 07:53
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,
@shakahl
shakahl / how-to-integrate-wsl-with-windows-10.md
Last active April 19, 2024 07:51
How to seamlessly integrate Windows Subsystem for Linux (WSL) with Windows

How to seamlessly integrate Windows Subsystem for Linux (WSL) with Windows

Installation

Install an Ubuntu version from Microsoft Store.

Please check out the Windows 10 Installation Guide written by Microsoft itself.

@thinca
thinca / megurorb17.md
Created July 31, 2018 13:39
Meguro.rb #17 Ruby で Vim を拡張する

Ruby で Vim を拡張する

@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@Rich-Harris
Rich-Harris / imperative-v-declarative-imports.md
Last active April 19, 2024 07:49
Why imperative imports are slower than declarative imports

Why imperative imports are slower than declarative imports

A lot of people misunderstood Top-level await is a footgun, including me. I thought the primary danger was that people would be able to put things like AJAX requests in their top-level await expressions, and that this was terrible because await strongly encourages sequential operations even though a lot of the asynchronous activity we're talking about should actually happen concurrently.

But that's not the worst of it. Imperative module loading is intrinsically bad for app startup performance, in ways that are quite subtle.

Consider an app like this:

// main.js
@Rich-Harris
Rich-Harris / footgun.md
Last active April 19, 2024 07:47
Top-level `await` is a footgun

Edit — February 2019

This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:

  • TC39 is currently moving forward with a slightly different version of TLA, referred to as 'variant B', in which a module with TLA doesn't block sibling execution. This vastly reduces the danger of parallelizable work happening in serial and thereby delaying startup, which was the concern that motivated me to write this gist
  • In the wild, we're seeing (async main(){...}()) as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problems
  • Therefore, a version of TLA that solves the original issue is a valuable addition to the language, and I'm in full support of the current proposal, which you can read here.

I'll leave the rest of this document unedited, for archaeological

@osama2kabdullah
osama2kabdullah / Tailwind CSS with Shopify Theme.md
Created June 12, 2023 08:45
How to add Tailwind CSS in a shopify theme in development mode only

Add Tailwind CSS in Shopify Theme

  1. Initial node.js package manager with npm or yarn by running
yarn init -y 
#or
npm init -y