Skip to content

Instantly share code, notes, and snippets.

@markuman
markuman / README.md
Last active November 2, 2024 19:06
🗺️ 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"]="↓"
@indyfromoz
indyfromoz / VNC_Server_On_Ubuntu_22.04LTS.md
Last active November 5, 2024 03:42
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
@SkyyySi
SkyyySi / youtube-vanced-alternatives.md
Last active November 17, 2024 08:08
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 November 6, 2024 23:56
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: {
@novaleksey
novaleksey / peewee_enum.py
Last active August 13, 2024 20:54
Peewee 3 Enum Field Postgres
from peewee import *
database = PostgresqlDatabase(
'my_database',
**{'user': 'postgres', 'password': 'postgres', 'host': 'localhost', 'port': 5432, 'autorollback': True}
)
class BaseModel(Model):
class Meta:
@the-spyke
the-spyke / pipewire.md
Last active November 15, 2024 01:05
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.