Skip to content

Instantly share code, notes, and snippets.

@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active December 22, 2025 13:13
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@ademola-lou
ademola-lou / BlueNoise.js
Last active December 22, 2025 13:10
SSGI noise free
export default `5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkOfq4wVRIAHvoavPHvN1lpk3X4Y1yzAPGe8S9KBs3crc4GwlU1dEOXiWol/mgQqxkNqB1xd04+0Bmpwj0GcCc4NUi+c731FUxjvaexCkCJ0qhrJJ++htWqetNC4NewClu8aFRSwrqiJEGe+qtTg4CYCHaF1wJI0sy/ZBQAI0qAMyBvVjWZlv2pdkCaro9eWDLK5I4mbb8E4d7hZr9dDJiTJm6Bmb5S+2F7yal/JPdeLUfwq7jmVLaQfhv4tWMJAt7V4sG9LuAv2oPJgSj1nnlBvPibfHM2TrlWHwGCLGxW/5Jm2TotaDL+pHDM5pn1r0UuTZ24N8S5k68bLHW9tfD+2k4zGev23ExJb4YTRKWrj82N5LjJ26lj1BkGZ0CsXLGGELoPaYQomjTqPxYqhfwOwDliNGVqux9ffuybqOKgsbB51B1GbZfG8vHDBE2JQGib1mnCmWOWAMJcHN0cKeDHYTflbDTVXajtr68mwfRje6WueQ/6yWqmZMLWNH7P27zGFhMFqaqfg11Q88g/9UA/FROe9yfq0yOO0pnNAxvepFy2BpEbcgG+mCyjCC01JWlOZlIPdf1TtlyOt7L94ToYGCukoFt4OqwOrofamjECpSgKLLmrRM+sNRAw12eaqk8KtdFk7pn2IcDQiPXCh16t1a+psi+w9towHTKPyQM0StKr61b2BnN1HU+aezFNBLfHTiXwhGTbdxLLmrsAGIVSiNAeCGE8GlB0iOv2v78kP0CTmAPUEqnHYRSDlP+L6m/rYjEK6Q
class DOHService {
static func setupDoH() {
// change the server url to your doh server's url
let serverUrl = "doh.example.com"
let manager = NEDNSSettingsManager.shared()
manager.loadFromPreferences { loadError in
// handles error
if let loadError = loadError {
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active December 22, 2025 13:09
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@ksopyla
ksopyla / install_cuda_12_ubuntu_22.04.md
Last active December 22, 2025 13:03
How to install CUDA toolkit 12 on ubuntu 22.04, step by step guide

Step by step instruction how to install CUDA 12 Ubuntu 22.04

Clean all previous nvidia packages [optional step]

sudo apt purge nvidia*
sudo apt remove nvidia-*
sudo rm /etc/apt/sources.list.d/cuda*
@technocake
technocake / pyclean.sh
Last active December 22, 2025 12:52
Clear all python cache in directory
# pyclean command to clear all python cache in a directory
# source: https://stackoverflow.com/questions/28991015/python3-project-remove-pycache-folders-and-pyc-files
# in .bash_profile / .bash_rc etc put:
pyclean () {
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
}
@jishanshaikh4
jishanshaikh4 / spot_no_ads.sh
Created December 1, 2021 17:41
Install Spotify for Linux (Ubuntu/Debian based distro) WITHOUT ADS
#!bin/bash
####################################################################################
# INSTALL S P O T I F Y ON LINUX (WITHOUT ADS)
# Estimated download size 500-600 MB
# How to execute this script?
@Rankototph
Rankototph / index.html
Created December 22, 2025 12:45
Untitled
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Furrymuse | 每一只宠物都是艺术灵感</title>
<style>
/* 核心配色:提取自 LOGO */
:root {
--pink: #e91e63; --blue: #2196f3; --orange: #ff9800; --green: #4caf50;
@brodock
brodock / HueDimmer_RWL022.yaml
Last active December 22, 2025 12:48
Philips Hue Dimmer RWL022
blueprint:
name: Philips Hue Dimmer RWL022
description:
"Control lights with a Philips Hue Dimmer Switch (v2).\n\n Blueprint\
\ Version: 4"
domain: automation
source_url: https://gist.github.com/brodock/0c85f4882b885d4d5499cd88d155c38c
homeassistant:
min_version: "2025.9.1"
input: