Skip to content

Instantly share code, notes, and snippets.

@morphykuffour
morphykuffour / install-nix-no-root.sh
Created November 2, 2022 03:44 — forked from jfroche/install-nix-no-root.sh
Nix install without root access
function install_nix() {
set -x
local -r bindir="${HOME}/bin"
local -r proot_url="https://github.com/proot-me/proot/releases/download/v5.3.0/proot-v5.3.0-x86_64-static"
local -r nixdir="${HOME}/mnt/nix"
local -r nixver="2.5.1"
local -r arch="x86_64"
local -r os="linux"
local -r nix_url="https://releases.nixos.org/nix/nix-${nixver}/nix-${nixver}-${arch}-${os}.tar.xz"
local -r nix_cli_dir=nix-${nixver}-${arch}-${os}
@tjdevries
tjdevries / cfilter.lua
Created September 29, 2022 03:12
cfilter.vim -> cfilter.lua
-- vim9script
-- # cfilter.vim: Plugin to filter entries from a quickfix/location list
-- # Last Change: Jun 30, 2022
-- # Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
-- # Version: 2.0
-- #
-- # Commands to filter the quickfix list:
-- # :Cfilter[!] /{pat}/
-- # Create a new quickfix list from entries matching {pat} in the current
-- # quickfix list. Both the file name and the text of the entries are
@Zyst
Zyst / KeyBR Colemak-DH ANSI.js
Last active November 21, 2023 07:18
Makes the KeyBR Colemak Layout be Colemak-DH on an ANSI Keyboard. Install with TamperMonkey
// ==UserScript==
// @name KeyBR Colemak-DH
// @namespace http://tampermonkey.net/
// @version v1.1
// @description Switch Colemak layout in keybr.com to Colemak DH
// @author https://github.com/Zyst
// @match https://www.keybr.com/
// @icon https://www.google.com/s2/favicons?domain=keybr.com
// @grant none
// @contributors https://github.com/hilarycheng
@zhaofengli
zhaofengli / simple-vm.nix
Created June 2, 2021 02:53
Simple script to start a riscv64 VM
with builtins;
let
pkgs = import ./. {};
cross = pkgs.pkgsCross.riscv64;
kernel = cross.linuxPackages_5_12.kernel;
busybox = cross.busybox.override { enableStatic = true; };
memory = "1G";
smp = 4;
@thalamus
thalamus / ArchLinuxARM-M1
Last active July 16, 2024 18:15
How to boot Arch Linux ARM in QEMU (patched for M1)
/*
* This document is provided to the public domain under the
* terms of the Creative Commons CC0 public domain license
*/
How to boot Arch Linux ARM in QEMU (patched for M1)
Prerequisites:
QEMU - patched for M1 processors - patches: https://github.com/utmapp/qemu
@jmoyers
jmoyers / 1. README.md
Last active June 23, 2023 17:00
Get up and running with a terminal, vim, and c++
  • color scheme
  • terminal
  • z proj, takes you to /some/deep/directory/project
@windwp
windwp / i3-swallow.py
Last active January 4, 2023 11:27
i3-swallow used to swallow a terminal window in i3
#!/usr/bin/env python3
#-----------------------------------------------
# used to swallow a terminal window in i3
#
# INSTALL
# Install python 3 and install i3ipc libary
# pip3 install i3ipc
# download this scrript and put it to your i3 config folder and run
@panzerstadt
panzerstadt / README.md
Last active June 17, 2024 14:50
QMK keycode to open a program

most of the above file is copied from the default keymap.c file from the hifumi keymap. the above file is a full copy pasted keymap.c, ready for use on a hifumi 6-key macropad, keymaps doing:

first col second col third col
page down up arrow start steam
left arrow down arrow right arrow

TLDR: on your keymap:

@thomasmaurer
thomasmaurer / settings.json
Last active March 27, 2023 03:34
My Windows Terminal Settings settings.json February 2021
// This file was initially generated by Windows Terminal 1.3.2651.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@Gordin
Gordin / cd_for_windows_paths.sh
Last active May 1, 2024 14:32
If you put this in your .bashrc/.zshrc you will be able to use cd to Windows style paths. This is probably only useful for WSL users.
cd() {
# Check if no arguments to make just typing cd<Enter> work
# Also check if the first argument starts with a - and let cd handle it
if [ $# -eq 0 ] || [[ $1 == -* ]]
then
builtin cd $@
return
fi
# If path exists, just cd into it
# (also, using $* and not $@ makes it so you don't have to escape spaces any more)