Skip to content

Instantly share code, notes, and snippets.

@karambirov
karambirov / UIHostingController+SafeArea.swift
Last active May 12, 2024 08:12
How to ignore safe area in UIHostingController
import SwiftUI
extension UIHostingController {
convenience public init(rootView: Content, ignoreSafeArea: Bool) {
self.init(rootView: rootView)
if ignoreSafeArea {
disableSafeArea()
}
@amiorin
amiorin / README.md
Last active May 12, 2024 08:11
How to configure Home Row Mods with KMonad on macOS

Intro

Karabiner and KMonad are great open source software. Don't forget to support the authors and contributors.

If you want to try home row mods on OSX, don't use Karabiner but KMonad. KMonad is harder at the beginning but then it is easier than Karabiner. Creating layers in KMonad is trivial and without drawbacks, while it is impossible in Karabiner without drawbacks.

You need to compile a PR of the project. Install https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice/releases/download/v2.1.0/Karabiner-DriverKit-VirtualHIDDevice-2.1.0.pkg

@richardpl
richardpl / drcbox.lua
Last active May 12, 2024 08:11
dynaudnorm filter with visual feedback
--[[
mpv dynaudnorm filter with visual feedback.
Copyright 2016 Avi Halachmi ( https://github.com/avih )
Copyright 2020 Paul B Mahol
License: public domain
Needs mpv with very recent FFmpeg build.
Default config:
@stecman
stecman / README.md
Last active May 12, 2024 08:09
Pushover notification CLI script

Send Pushover notifications from the command line

Notify is a utility for sending push notifications via Pushover from the command line. It can be run manually, but is most useful for sending notifications from shell scripts, cron jobs, and long running tasks.

Pushover screenshot

Installation

To install, copy the contents of notify.php to somewhere on your computer, and make it executable:

@kvnxiao
kvnxiao / awesome-selfhosted-sorted-by-stars.md
Last active May 12, 2024 08:08
awesome-selfhosted-sorted-by-stars.md

Awesome-Selfhosted

Awesome

Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.

See Contributing.

@Klerith
Klerith / ProductForm.tsx
Created November 27, 2023 17:59
Formulario para actualizar un producto
"use client";
import { Product } from "@/interfaces";
interface Props {
product: Product;
}
const sizes = ["XS", "S", "M", "L", "XL", "XXL"];
@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

@tienthanh2509
tienthanh2509 / run.sh
Created August 12, 2023 16:22
Termux SSHD for root user
export PATH=/data/data/com.termux/files/usr/bin:$PATH
sshd \
-D -dd \
-p 2222 -e
@pesterhazy
pesterhazy / building-sync-systems.md
Last active May 10, 2024 22:12
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles