Skip to content

Instantly share code, notes, and snippets.

@flipeador
flipeador / configure-adguard-dns.ps1
Last active May 23, 2025 00:39
Configure AdGuard DNS (Encrypted) in Windows 11 with PowerShell.
# Configure the public AdGuard DNS server with DoH (Encrypted) programatically in W11.
# https://adguard-dns.io/en/public-dns.html#:~:text=Configure%20AdGuard%20DNS%20manually
# Define AdGuard DNS servers and their DoH template.
$servers4 = @(
# IPv4 default servers: block ads and trackers.
@{ address = "94.140.14.14"; template = "https://dns.adguard-dns.com/dns-query" },
@{ address = "94.140.15.15"; template = "https://dns.adguard-dns.com/dns-query" }
)
@flipeador
flipeador / robocopy.ahk
Last active March 27, 2025 02:53
A basic GUI for backing up files and directories with ROBOCOPY in Windows.
;@Ahk2Exe-SetFileVersion 1.0.4.0
;@Ahk2Exe-SetProductName Robocopy backup tool
;@Ahk2Exe-SetCopyright https://gist.github.com/flipeador/29ac92f277f4c01e07659f17f8c0caa5
#Requires AutoHotkey v2
#SingleInstance Off
#NoTrayIcon
TITLE := 'Robocopy backup tool'
@cjbayliss
cjbayliss / dark-mode.js
Last active December 10, 2024 23:21
dark-mode.js
// ==UserScript==
// @name dark-mode
// @match *://*/*
// @grant none
// @version 1.1
// @author cjb
// @run-at document-start
// ==/UserScript==
const adjustColors = () => {
@schacon
schacon / better-git-branch.sh
Created January 13, 2024 18:41
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@ryanrudolfoba
ryanrudolfoba / SteamOS-Recovery-Downloader-and-Flasher.sh
Created January 9, 2024 21:04
Script for SteamOS to easily download and flash the latest SteamOS Recovery Image to a USB device
#!/bin/bash
# SteamOS Recovery Downloader and Flasher
# script by ryanrudolf
# https://github.com/ryanrudolfoba
# https://youtube.com/@10minutesteamdeckgamer
#
# script will create the directory - ~/SteamOS-Recovery-Downloader and automatically download the latest SteamOS Recovery Image.
# script will perform a md5 check to make sure that download is not corrupted and finally flash the image to the USB device.
# if there are multiple USB devices, the script will exit immediately. Plug in a single USB device that you want to flash and re-run the script.
#
@wesbos
wesbos / logger.js
Created January 8, 2024 15:55
console.log line numbers in Node.js
// Use like this: node --import logger.js yourapp.js
import path from 'path';
const { log } = console;
[`debug`, `log`, `warn`, `error`, `table`, `dir`].forEach((methodName) => {
const originalLoggingMethod = console[methodName];
console[methodName] = (...args) => {
const originalPrepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = (_, stack) => stack;
@EstebanMqz
EstebanMqz / Settings.md
Last active October 4, 2024 04:08
Settings.md

@deepanchal
deepanchal / starship.toml
Last active November 2, 2024 19:22
Starship config
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
format = """
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
@OdatNurd
OdatNurd / text_highlight.py
Last active January 17, 2023 19:13
Simple Text Highlight Plugin
import sublime
import sublime_plugin
import functools
import re
# The key the key that we use to add regions for the word currently under the
# cursor (when that is turned on), the style of the regions added, and the
# scope that represents the color to use when words are highlighted.
CURRENT_WORD_KEY='_sel_word'
@Leokuma
Leokuma / theme.ahk
Last active February 2, 2025 18:35
[AHK] Toggle dark mode (Win11)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#NoTrayIcon ; If you don't want a tray icon for this AutoHotkey program.
#SingleInstance force ; Skips the dialog box and replaces the old instance automatically
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir, %A_ScriptDir% ; Set default directory to where this script file is located. (Note %% because it's expecting and unquoted string)
NumpadUp::
RegRead, light, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize, SystemUsesLightTheme
if light {