Skip to content

Instantly share code, notes, and snippets.

@alvinsng
alvinsng / no-use-effect.md
Created March 17, 2026 20:00
Skill generated by Factory Droid
name description
no-use-effect
Enforce the no-useEffect rule when writing or reviewing React code. ACTIVATE when writing React components, refactoring existing useEffect calls, reviewing PRs with useEffect, or when an agent adds useEffect "just in case." Provides the five replacement patterns and the useMountEffect escape hatch.

No useEffect

@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active March 18, 2026 17:57
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.
@Dan0sz
Dan0sz / apps.conf
Created October 21, 2018 12:33
Nginx configuration for reverse proxy for SABnzbd, Sonarr, Radarr and Transmission
server_name nas.yourdomain.com 192.168.xxx.xxx;
location /sabnzbd {
proxy_pass https://localhost:9080/sabnzbd;
}
location /sonarr {
proxy_pass http://localhost:8989/sonarr;
}
@grenscorrectie-netizen
grenscorrectie-netizen / gist:07d1b91813cb13b51c82fdd7be52f391
Created March 18, 2026 14:41 — forked from app103/gist:aed0696471ea2c4efec76d014bbe1e95
Simple Wide-screen UserStyle Theme for Mokum.place
/* BEGIN Mokum.place tweaks */
/* ==UserStyle==
@name Widescreen for Mokum
@namespace url(http://www.w3.org/1999/xhtml);
@version 1.0.0
@description An ultra simple widescreen theme for Mokum.place
@author app103 url(https://mokum.place/app103);
==/UserStyle== */
@-moz-document domain("mokum.place") {
.container { width: 100% !important;
@wanglf
wanglf / vscode-extension-offline.md
Last active March 18, 2026 17:53
Download VS Code extensions as VSIX

How to use?

  • Copy content of vsix-bookmarklet, create a bookmark in your browser.
  • Navigate to the web page of the VS Code extension you want to install.
  • Click the bookmark you just created, then click the download button.
    download
  • After download finished, rename the file extension to *.vsix.
  • In VS Code, select Install from VSIX... in the extension context menu.
    vsc

Kafka Security

Background

Bucket notification integration with Kafka is a very useful feature in the RGW. However, some security features needed for such integrations are missing. so, in this project we will try to make bucket notifications over kafka more secure. The following features are missing:

The main challenge in the above would be in automating the tests, so they could easily run locally,

@sailKiteV
sailKiteV / Obsidian_KCCuJa4T0o.gif
Last active March 18, 2026 17:47
A rather inelegant—but functional!—attempt at providing a callout-based, pure CSS implementation of in-leaf tabs for Obsidian.md
Obsidian_KCCuJa4T0o.gif
@handcoding
handcoding / Ashley’s Light Fader.yaml
Last active March 18, 2026 17:46
This script for Home Assistant will fade a lamp over time with your choice of easing, including varieties of ease-in, ease-out, and ease-in-out.
alias: Ashley’s Light Fader
description: >
Fades a lamp over time. If you have any questions or comments about this
script, feel free to tweet Ashley Bischoff at @FriendlyAshley. Released under
the Apache 2.0 license. (v2.01)
fields:
light:
name: 💡 Light
description: entity_id of the lamp.
selector:
@agarthetiger
agarthetiger / QuotesInJenkinsfiles.groovy
Last active March 18, 2026 17:43
Quoting strings and variable interpolation in Jenkinsfiles, passing values to shell tasks.
node{
timestamps{
stage('Samples'){
// Single quotes with no interpolation, at least not in Jenkins.
// The dollar variable will be evaluated before being run by the
// shell command, so variables which Jenkins makes available as
// environment variables can still be accessed from within a
// single-quoted string, passed to the sh task.
sh 'echo $PATH'