Skip to content

Instantly share code, notes, and snippets.

@markuman
markuman / README.md
Last active February 11, 2025 11:30
🗺️ OSM - self host the entire planet 🌎 in ~30 minutes 🚀

🗺️ OSM - self host the entire planet 🌎 in ~30 minutes 🚀

TL;DR

mkdir osm
wget -O osm/planet.mbtiles https://hidrive.ionos.com/api/sharelink/download?id=SYEgScrRe
podman run -ti --rm -p 9000:9000 --name sms -v $(pwd)/osm/:/data/ registry.gitlab.com/markuman/sms:latest
firefox http://localhost:9000
@kRHYME7
kRHYME7 / hotkeys.sh
Created November 25, 2023 02:52
Just Parsing the keybings from hyprland configuration then display to yad. ( )
#!/usr/bin/env sh
#!Declare Some Symbols or Replacements here just to look good
declare -A replacements=(
["XF86Audio"]="🕪 "
["XF86MonBrightnessUp"]="☼ ↑"
["XF86MonBrightnessDown"]="☼ ↓"
['$mainMod']="[]"
["UP"]="↑"
["DOWN"]="↓"
@MendyLanda
MendyLanda / drizzle-ulid.md
Created November 5, 2023 13:29
Implementing Efficient Binary ULID Storage in MySQL with Drizzle ORM

For anyone considering the use of ULIDs in MySQL with drizzle, here's a ready-to-use ULID type for your convenience.

import { Ulid as ULID } from "id128";

export const ulid = customType<{
  data: string;
  notNull: true;
  default: false;
@indyfromoz
indyfromoz / VNC_Server_On_Ubuntu_22.04LTS.md
Last active April 14, 2025 13:34
VNC Server setup on Ubuntu 22.04 LTS

Setup

Install TigerVNC -

$ sudo apt install tigervnc-standalone-server

Configure VNC Server by running

@Lattay
Lattay / README.md
Last active January 6, 2023 20:32
Configure luarocks for Neovim at startup (Linux)

When using Lua-based plugins for Neovim, you may need to install some packages with luarocks. To use these packages, the environment variables LUA_PATH and LUA_CPATH needs to contain the luarocks directories. Problem is, Neovim uses LuaJIT which is a Lua 5.1 implementation; however, you may already have your environment setup for a different Lua version, for example the current last version 5.4. To resolve this problem, this gist patches the Lua paths in the startup configuration instead of relying on the environment variables as is default in Neovim.

@eyeseast
eyeseast / python.md
Last active May 6, 2024 17:11
How to set up Python in 2022

I have an updated version of this on my blog here: https://chrisamico.com/blog/2023-01-14/python-setup/.

Python

This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.

Tools and helpful links:

  • Python docs: https://docs.python.org/3/
  • Python Standard Library:  - Start here when you're trying to solve a specific problem
@DonHuskini
DonHuskini / hooks.ts
Last active March 24, 2025 12:22
useMediaQuery & useBreakpoints hooks for handling conditional rendering on multiple breakpoints (Adapted for Next.js)
// -------------------------
// useMediaQuery
import { useState, useEffect, useLayoutEffect } from "react";
export function useMediaQuery(query: string) {
const [matches, setMatches] = useState(false);
useEffect(() => {
const media = window.matchMedia(query);
@SkyyySi
SkyyySi / youtube-vanced-alternatives.md
Last active April 7, 2025 00:27
A list of alternatives after the shutdown of Vanced

NONE OF THESE CLIENTS ARE VERIFIED BY ME FOR SECURITY OR ANYTHING ELSE! USE AT YOUR OWN RISK!

These are the current alternatives (with links when possible):

@FbN
FbN / vite.config.js
Last active April 6, 2025 13:31
vite.config.js node built-in polyfills
// yarn add --dev @esbuild-plugins/node-globals-polyfill
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'
// yarn add --dev @esbuild-plugins/node-modules-polyfill
import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill'
// You don't need to add this to deps, it's included by @esbuild-plugins/node-modules-polyfill
import rollupNodePolyFill from 'rollup-plugin-node-polyfills'
export default {
resolve: {
alias: {