Skip to content

Instantly share code, notes, and snippets.

@JubairRahman
JubairRahman / Markdown Badges.md
Last active March 25, 2025 13:45
This Gist contains a collection of useful Markdown badges that you can include in your GitHub repositories, README files, or other Markdown-supported documents. Markdown badges are visually appealing icons with hyperlinks that provide essential information at a glance. These badges can represent various aspects of your project, such as licenses,…
@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork [email protected]
@alexberry
alexberry / automate-ubiquity-ap-leds-homeassistant.md
Last active March 25, 2025 13:42
Automating Ubiquity AP LEDs with Home Assistant & Unifi Network

This is a small guide to set up Unifi AP LED Control using Home Assistant.

Known Supported Hardware

These scripts have been tested as working on the following hardware:

Home Assistant Hosting

@douglasparker
douglasparker / README.md
Last active March 25, 2025 13:42
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.

@mharsch
mharsch / mt_viki_remote
Created February 18, 2023 18:32
Arduino replaces MT-VIKI KVM remote module for changing / polling selected KVM input
#include <math.h>
// connected to 'D+' pin on mini USB
const int input_pin = 11;
// connected to 'D-' pin on mini USB
const int output_pin = 12;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
@paulirish
paulirish / what-forces-layout.md
Last active March 25, 2025 13:41
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@thanhminhmr
thanhminhmr / README.md
Last active March 25, 2025 13:41
Go doesn't have ternary, so created one...

go-ternary

Yes, I know—yet another attempt at bringing a ternary-like experience to Go. But hey, Go doesn’t have one, and I wasn’t around when the last million were written.

Why?

Because Go doesn't have a ternary operator, and according to the official FAQ, it likely never will. The reasoning? To prevent developers from writing "impenetrably complex expressions." But let's be real—poor coding practices exist in all forms. Instead of outright banning a useful construct, wouldn’t compiler warnings for overly complicated ternary expressions have been a more reasonable approach?

Since that's not happening, here’s go-ternary—because sometimes, a one-liner is just nicer than an if-else.

@jakobbouchard
jakobbouchard / 00-intro.md
Last active March 25, 2025 13:41
Une liste d'alternatives à Big Tech
@jclosure
jclosure / bidirectional_clipboard.md
Last active March 25, 2025 13:40
Setup a bi-directional shared clipboard between client macos and linux server for remote terminal emacs.

Using netcat and ssh tunnels, create a shared clipboard allowing client and server clipboards to be fused

Serve pbcopy and pbpaste on Mac's localhost

NOTE: That we are making the assumption that the clipboards are sending and receiving UTF-8 encoded bytes

~/Library/LaunchAgents/pbcopy.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@josantonius
josantonius / language-codes.json
Last active March 25, 2025 13:38
List of 217 language codes (ISO 639-1)
{
"aa": "Afar",
"ab": "Abkhazian",
"ae": "Avestan",
"af": "Afrikaans",
"ak": "Akan",
"am": "Amharic",
"an": "Aragonese",
"ar-ae": "Arabic (U.A.E.)",
"ar-bh": "Arabic (Bahrain)",