Skip to content

Instantly share code, notes, and snippets.

@justincbagley
justincbagley / How_to_Convert_Markdown_to_PDF.md
Last active March 5, 2025 10:21
How To Convert Markdown to PDF

How to convert markdown to PDF:

This post reviews several methods for converting a Markdown (.md) formatted file to PDF, from UNIX or Linux machines.

Using Pandoc:

$ pandoc How_I_got_svg-resizer_working_on_Mac_OSX.md -s -o test1.pdf
@skoqaq
skoqaq / build4123.sublime4.key
Last active March 5, 2025 10:20
Sublime Text 4 License Key
—– BEGIN LICENSE —–
Mifeng User
Single User License
EA7E-1184812
C0DAA9CD 6BE825B5 FF935692 1750523A
EDF59D3F A3BD6C96 F8D33866 3F1CCCEA
1C25BE4D 25B1C4CC 5110C20E 5246CC42
D232C83B C99CCC42 0E32890C B6CBF018
B1D4C178 2F9DDB16 ABAA74E5 95304BEF
9D0CCFA9 8AF8F8E2 1E0A955E 4771A576
@gyopiazza
gyopiazza / schema.ts
Last active March 5, 2025 10:19
Multi-tenant with Drizzle ORM (multiple sqlite databases) - PoC
import { integer, sqliteTableCreator, text } from 'drizzle-orm/sqlite-core'
const sqliteTable = (tenant?: string) =>
sqliteTableCreator(name => (tenant ? `${tenant}_${name}` : name))
export const users = sqliteTable()('users', {
id: integer('id', { mode: 'number' }).primaryKey({ autoIncrement: true }),
name: text('name'),
})
@lkoskela
lkoskela / UIColor+Contrast.swift
Created March 30, 2017 11:46
Utility for calculating the relative luminance and contrast ratio of two colors to determine whether they meet the recommendation set forth by the W3's Web Content Accessibility Guidelines 2.0.
import UIKit
extension UIFont {
private var weight: CGFloat {
if let traits = fontDescriptor.object(forKey: UIFontDescriptorTraitsAttribute) as? NSDictionary,
let weight = traits[UIFontWeightTrait] as? CGFloat {
return weight
}
return 0
}
@carloitaben
carloitaben / TransitionRouter.tsx
Created October 29, 2024 10:39
React 19 page transitions
import type { ReactNode } from "react"
import { useEffect, useState, useTransition } from "react"
import { createSafeContext } from "@/lib/context"
type TransitionRouterStage = "entering" | "leaving" | undefined
type TransitionRouterStartFunction = (
callback: () => void | Promise<void>
) => void
@darrenjrobinson
darrenjrobinson / GetStaleAADGuestAccounts.ps1
Last active March 5, 2025 10:15
Get all AAD B2B Guest Accounts which haven't signed in, in the last XX Days, or haven't accepted a B2B Guest Invitation in last XX Days. Associated Blogpost https://blog.darrenjrobinson.com/finding-stale-azure-ad-b2b-guest-accounts-based-on-lastsignindatetime
Function AuthN {
<#
.SYNOPSIS
Authenticate to Azure AD and receieve Access and Refresh Tokens.
.DESCRIPTION
Authenticate to Azure AD and receieve Access and Refresh Tokens.
.PARAMETER tenantID
(required) Azure AD TenantID.
@jamescherti
jamescherti / inputrc_hjkl_motion.conf
Last active March 5, 2025 10:13
inputrc: add hjkl bindings to ~/.inputrc (used by the shells bash, sh...).
" Config file: Add lines to ~/.inputrc
" Description: Add hjkl bindings to ~/.inputrc
" (used by the readline and command line
" shells bash, sh...).
" Alt-h: left
" Alt-j: down
" Alt-k: up
" Alt-j: right
" Author: James Cherti
" GitHub Gist: https://gist.github.com/jamescherti/3b6582c6079ba80e55c9927021d1edc5
@Anonimous05
Anonimous05 / README.md
Last active March 5, 2025 10:13
Free Activation Code for JetBrains Products

My greetings, for everyone.

How to activate any JetBrains products with 3.jetbra.in?

First we need to visit this website

https://3.jetbra.in

Click the first link with Online status, by default is ipfs.io

Screenshot 2024-12-28 at 19 22 31

@VictorTaelin
VictorTaelin / claude_code_hvm_work.txt
Created March 5, 2025 02:18
Claude Code optimizes HVM3-Nano from 183 MIPS to 265 MIPS on Apple M3 // 217 MIPS to 328 MIPS on Apple M4
╭────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code research preview! │
│ │
│ /help for help │
│ │
│ cwd: /Users/v/vic/dev/IC │
╰────────────────────────────────────────────╯
! cat InteractionCalculus.md
@AmeenAhmed1
AmeenAhmed1 / Automated-Script.sh
Last active March 5, 2025 10:12
Automate the Process with a Shell Script and Explanation
#!/bin/bash
# Define the base path of the script
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
BUILD_DIR="$SCRIPT_DIR/ArchiveDirectory"
echo "Cleaning Xcode project..."
xcodebuild clean \
-workspace [THE PROJECT WORKSPACE].xcworkspace \
-scheme [SCHEMA] \