Skip to content

Instantly share code, notes, and snippets.

@armamini
armamini / README.md
Last active December 17, 2025 08:15
Implement a reliable connection over Websocket via Cloudflare Workers

ساخت با Cloudflare Workers

این راهنما به شما کمک می‌کند تا بدون هزینه و سرور مجازی، یک فیلترشکن شخصی با سرعت بالا و پینگ مناسب روی زیرساخت کلادفلر بسازید. (V2Ray over Websocket)


📋 پیش‌نیازها

  1. اکانت Cloudflare: نیاز به یک ایمیل موقت دارید.
  2. کد اسکریپت: کدی که باید در ورکر قرار دهید (موجود در فایل‌های این مخزن).
  3. UUID: یک کد یکتا که به عنوان رمز عبور عمل می‌کند.
@kmanadkat
kmanadkat / Nginx-reverse-proxy.md
Created February 22, 2023 12:39
Setting Up NGINX Reverse Proxy For Local Development

Setup Hosts File

This is very straight forward process and involves editing a single file. You will need sudo privileges for this.

  1. Open Terminal and execute below to open hosts file

    sudo nano /etc/hosts
@lukepighetti
lukepighetti / .zshrc
Created March 3, 2023 15:41
marksman environment for note taking https://youtu.be/8GQKOLh_V5E
# launch daily notes with `notes`
# launch specific notes with `notes woodworking`
# this is a cloud synced file, so it's live on all my devices
function notes(){
SUBJECT="${1:=daily}"
if [ -z "$SUBJECT" ]
then
(cd ~/Documents/notes && hx NOTES.md)
else
(cd ~/Documents/notes && hx "${SUBJECT:u}.md" NOTES.md)
@JDWarner
JDWarner / _dice.py
Last active December 17, 2025 08:08
Dice coefficient between two boolean NumPy arrays or array-like data. This is commonly used as a set similarity measurement (though note it is not a true metric; it does not satisfy the triangle inequality). The dimensionality of the input is completely arbitrary, but `im1.shape` and `im2.shape` much be equal. This Gist is licensed under the mod…
"""
_dice.py : Dice coefficient for comparing set similarity.
"""
import numpy as np
def dice(im1, im2):
"""
@JDWarner
JDWarner / _jaccard.py
Last active December 17, 2025 08:08
Jaccard coefficient between two boolean NumPy arrays or array-like data. This is commonly used as a set similarity metric, and it is a true metric. The dimensionality of the input is completely arbitrary, but `im1.shape` and `im2.shape` much be equal. This Gist is licensed under the modified BSD license, otherwise known as the 3-clause BSD.
"""
_jaccard.py : Jaccard metric for comparing set similarity.
"""
import numpy as np
def jaccard(im1, im2):
"""
@bahadiraraz
bahadiraraz / Git_Commit_Freeze_Solution.md
Last active December 17, 2025 08:08
Git Commit Freeze Due to GPG Lock Issues (Solution)

Git Commit Freeze Due to GPG Lock Issues

If you encounter a problem where you cannot commit changes in Git – neither through the terminal nor via the GitHub Desktop application – the issue might be a freeze during the Git commit process. This is often caused by GPG lock issues. Below is a concise and step-by-step guide to resolve this problem.

Solution Steps

1. Check for GPG Lock Messages

Open your terminal and try to perform a GPG operation (like signing a test message). If you see repeated messages like gpg: waiting for lock (held by [process_id]) ..., it indicates a lock issue.

@raveenb
raveenb / monitor-flicker.md
Created August 28, 2025 08:05
External monitoring flickering when connected to apple mac with apple silicon

If your external monitor is flickering after your connect your apple mac that has apple silicon. And it didnt flicker if you connect an intel or other pc's. I have a solution for you

Problem

  1. the issue is due to the how apple silicon gpu's render images on certain monitors.
  2. i recently upgraded my old intel based mac book pro with m4 mac mini - great upgrade
  3. but the external monitors that were working properly earlier with the intel cpu mac was now showing flickering.
  4. the problem is that this flicker is not constant but it flickers when there are some shading of gray or transparency
  5. the issue i found out after a lot of research is that its because of how the apple gpu's render.
  6. apple gpu's use some tech call DCI dithering, which works great on apple monitors like the one on the laptop or apple's own monitor or some apple supported ones like LG Ultrafine.
  7. but on mine like BenQ, this dithering makes it look very strange and uncomfortable to view
@lawrenceching
lawrenceching / install-frp-as-systemd-service.sh
Last active December 17, 2025 08:07
Install frp as systemd service
#!/bin/bash
# Update on 2024/05/29
# 1. use wget to fetch latest frp version when curl was not installed
# 2. Remind users that frp will be run in non-root user
# 3. Add CI
#
# Update on 2024/04/13
# 1. Improved OS compatibility: try wget and then curl for downloading files.
#
# Update on 2024/01/26
@bmaupin
bmaupin / free-backend-hosting.md
Last active December 17, 2025 08:03
Free backend hosting
127.0.0.1 us.rdx2.lgtvsdp.com
127.0.0.1 us.info.lgsmartad.com
127.0.0.1 us.ibs.lgappstv.com
# 127.0.0.1 us.lgtvsdp.com
127.0.0.1 ad.lgappstv.com
127.0.0.1 smartshare.lgtvsdp.com
127.0.0.1 ibis.lgappstv.com
# added after fork
# from https://www.reddit.com/r/pihole/comments/6qmpv6/blacklists_for_lg_webos_tvs/ and others