Skip to content

Instantly share code, notes, and snippets.

View Doomwhite's full-sized avatar

DooMWhite Doomwhite

  • SC, Brazil
View GitHub Profile
@Doomwhite
Doomwhite / !README.md
Created September 14, 2025 05:48 — forked from mmozeiko/!README.md
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for native desktop app development.

Run py.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK - currently v14.40.33807 and v10.0.26100.0.

You can list available versions with py.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe first run setup_TARGET.bat - after that PATH/INCLUDE/LIB env variables will be updated to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@Doomwhite
Doomwhite / configuration.nix
Created May 28, 2025 18:26 — forked from jchv/configuration.nix
Nix configuration for VGA passthrough
{ config, pkgs, lib, ... }:
{
# IOMMU configuration
boot.kernelParams = [ "amd_iommu=on" "pcie_aspm=off" ];
boot.kernelModules = [ "kvm-amd" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
boot.extraModprobeConfig = ''
options vfio-pci ids=10de:13c2,10de:0fbb
options kvm ignore_msrs=1
'';
// ==UserScript==
// @name Smooth Scrolling
// @description Smoothly scrolls the page when a button is held
// @version 1.1.2
// @author sllypper
// @homepage https://greasyfork.org/en/users/55535-sllypper
// @namespace https://greasyfork.org/en/users/55535-sllypper
// @match *://*/*
// @grant none
// @todo make keybinds easily configurable
@Doomwhite
Doomwhite / nano.el
Created February 4, 2025 23:08 — forked from rougier/nano.el
NANO Emacs (minimal version: 256 lines)
;; nano-emacs.el --- NANO Emacs (minimal version) -*- lexical-binding: t -*-
;; Copyright (c) 2025 Nicolas P. Rougier
;; Released under the GNU General Public License 3.0
;; Author: Nicolas P. Rougier <nicolas.rougier@inria.fr>
;; URL: https://github.com/rougier/nano-emacs
;; This is NANO Emacs in 256 lines, without any dependency
;; Usage (command line): emacs -Q -l nano.el -[light|dark]

Guix on WSL2

(updated versions of this document, plus more, live here)

This will show you how to get Guix running on WSL2.
We're going to go as "minimal" as possible, without starting off one of the readily available WSL2 distros.
Parts of this guide should help with understanding how to set up any custom distro on WSL, not just Guix.

Disclaimer: I'm a Guix nOOb! (hence going through the trouble of installing it on WSL2)

@Doomwhite
Doomwhite / .obsidian.vimrc
Created October 25, 2024 01:35 — forked from megamind1230/.obsidian.vimrc
current state of my vimrc at 26-5-2024
" huge thanks to Keshav13142’s https://gist.github.com/Keshav13142
" (make sure to remove default Obsidian shortcuts if any conflicts happen)
" sometimes we use exmap to make aliases for long commands .. cuz of a bug in
" CodeMirror {it cannot handle many arguements}
" j AND k navigate visual lines rather than logical ones {both n&v modes}
nmap j gj
nmap k gk
vmap j gj
""""""""""""""""""""""
" Leader
""""""""""""""""""""""
" let mapleader=,
" can't set leaders in Obsidian vim, so the key just has to be used consistently.
" However, it needs to be unmapped, to not trigger default behavior: https://github.com/esm7/obsidian-vimrc-support#some-help-with-binding-space-chords-doom-and-spacemacs-fans
unmap ,
" map ; to : in normal mode, so that I don’t rely on the shift key
" nmap ; :
@Doomwhite
Doomwhite / browser_history.md
Created October 22, 2024 00:13 — forked from p32929/browser_history.md
Playing around with Chrome's history

Browser histories

Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.

The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.

Finder

Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.