Skip to content

Instantly share code, notes, and snippets.

abandoned
able
absolute
adorable
adventurous
academic
acceptable
acclaimed
accomplished
accurate
@hroi
hroi / fish_jj_prompt.fish
Last active December 29, 2024 02:41
Jujutsu (jj) prompt for fish-shell
# Place me in ~/.config/fish/functions
# Then add me to `fish_vcs_prompt`: `funced fish_vcs_prompt`
function fish_jj_prompt --description 'Write out the jj prompt'
# Is jj installed?
if not command -sq jj
return 1
end
# Are we in a jj repo?
@renich
renich / 00-gentoo-installation-partitioning.bash
Last active December 29, 2024 02:40
Install Gentoo on BtrFS subvolumes + UEFI
#!/usr/bin/env bash
# WARNING!!
# This will obliterate all the data in your partition!! (not actually true, but act as if it was)
# Do NOT execute this script if you don't fully understand it!
# a few vars
amount_of_swap=$( free --si -g | grep Mem: | gawk '{ print $2 + 1}' )
# create directories
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active December 29, 2024 02:37
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@douglasparker
douglasparker / README.md
Last active December 29, 2024 02:36
Disable & Enable MPO via the Windows Registry

Disable & Enable MPO via the Windows Registry

There is a well known issue where GPU drivers are crashing with multi-monitor setups due to an interaction with Windows MPO and both Nvidia and AMD GPUs.

Until this bug is fixed, the only solution is to disable MPO via the Windows Registry.

Disable MPO

To apply the fix, simply run mpo_disable.reg and reboot your computer.

@opastorello
opastorello / sublime text 4143 license key
Last active December 29, 2024 02:35
sublime text 4143 license key
> * Go to [hexed.it](https://hexed.it/)
> * Click "Open File" and choose your sublime_text.exe **(DON'T FORGET TO BACKUP YOUR EXE FILE)**
> * Go to Search and in "Search for" put: 80 78 05 00 0F 94 C1
> * In Search Type select "Enable replace" and put: 80 78 05 00 0F 94 C1
> * Click "Find next" then "Replace"
> * Do the same thing with: C6 40 05 01 48 85 C9 => C6 40 05 01 48 85 C9
> * Click "Save as" then name it: sublime_text
> * Copy your modified sublime_text.exe to directory Sublime Text
@andersr
andersr / gist:11004954
Last active December 29, 2024 02:33
Explain to an alien how to make a PBJ Sandwich

#Alien Sandwich A numbered list of instructions for explaining to an alien how to make a peanut butter and jelly sandwich

###Collect and define items needed to make a Peanut Butter and Jelly Sandwich.

  • "PBJ-sandwich" = Peanut Butter and Jelly Sandwich (the thing we will be making)
  • "pb-jar" = the cylindrical object in front of you containing a brown substance
  • "jelly-jar" = the cylindrical object in front of you containing a red substance
  • "plate" = the flat white object in front of you
  • "bread-loaf" = the brown, rectangle-shaped thing in front of you that is soft to the touch
  • "knife" = the narrow, silver-colored thing in front you with one side that is sharp to the touch. The side that is not sharp is the side you grasp. The knife can be used for two purposes: cutting and spreading. When used for cutting, grasp the knife and face the sharp part downward. When used for spreading, grasp the knife and and turn the knife so that the sharp part is horizontal.
@brianmed
brianmed / EmailQueueHostedService.cs
Created April 16, 2022 02:14
Example BackgroundService with C# ASP.Net Core
using Microsoft.EntityFrameworkCore;
namespace Joy.HostedServices;
public class EmailQueueHostedService : BackgroundService
{
private IServiceScopeFactory ScopeFactory { get; init; }
public EmailQueueHostedService(IServiceScopeFactory scopeFactory)
{
@Thesola10
Thesola10 / nix your reality.txt
Last active December 29, 2024 02:25
Sung to the tune of "Your Reality" from Doki Doki Literature Club
Every day, I imagine a future where I can be with you.
In my hand, is a pen that'll write derivations of me and you.
The bytes flow down into a hash table
Just move your PATH, link the way into this art.
But in this world of indefinite builds,
What will it take just to find stability?
What will it take just to find... that special day?
Have I found every package a derivation that works today?
@zajdee
zajdee / jool-init.sh
Last active December 29, 2024 02:20
Init Jool in a namespace
#!/bin/bash
# Save the file as e.g. /usr/sbin/jool-init.sh
# Edit to match your translation prefix
NAT64_PFX=64:ff9b::/96
# Edit to match your dual-stack interface
DUALSTACKIFACE=ens5
modprobe jool
# add namespace and devices to link the two namespaces