Skip to content

Instantly share code, notes, and snippets.

@rojenzaman
rojenzaman / multiple-push-urls.md
Created February 4, 2024 15:37 — forked from bjmiller121/multiple-push-urls.md
Add multiple push URLs to a single git remote

Sometimes you need to keep two upstreams in sync with eachother. For example, you might need to both push to your testing environment and your GitHub repo at the same time. In order to do this simultaneously in one git command, here's a little trick to add multiple push URLs to a single remote.

Once you have a remote set up for one of your upstreams, run these commands with:

git remote set-url --add --push [remote] [original repo URL]
git remote set-url --add --push [remote] [second repo URL]

Once set up, git remote -v should show two (push) URLs and one (fetch) URL. Something like this:

Rewrite "import then re-export" to a direct "re-export" approach via ast-grep.

Rule file see in file-import-to-export.yml

Preview Effect

- import Form, {
+ export {
@zthxxx
zthxxx / tmux.conf
Last active September 2, 2024 14:05
My tmux config, migrate from gnu screen config via ChatGPT
# ~/.config/tmux/tmux.conf
# https://quickref.me/tmux
# https://man7.org/linux/man-pages/man1/tmux.1.html
# Install
#
# ```bash
# mkdir -p ~/.config/tmux
# curl -sL https://gist.github.com/zthxxx/bbbb37c100254d688236c21e8b977b85/raw/tmux.conf -o ~/.config/tmux/tmux.conf
# ```
@ccy
ccy / linux-install.adoc
Last active June 26, 2024 21:29
Linux - Installation

Storage Layout

Production 1

@liviaerxin
liviaerxin / ffmpeg_samples.md
Last active September 3, 2024 17:09
FFmpeg samples #ffmpeg

FFmpeg Samples

FFmpeg Wiki

List private options of the codec

# Show available `presets`
ffmpeg -h encoder=h264_nvenc
# https://code.visualstudio.com/docs/editor/command-line#_working-with-extensions
# code --list-extensions
code --uninstall-extension cduruk.thrift
code --uninstall-extension byted-sec.bytesec-vscode
code --uninstall-extension byted-ide.ppe-debug
code --uninstall-extension byted-ide.ftt
code --uninstall-extension byted-ide.cloud-dev-task
code --uninstall-extension byted-ide.cloud-dev-debug
code --install-extension shalldie.background
@ninehills
ninehills / chatpdf-zh.ipynb
Last active April 23, 2025 10:17
ChatPDF-zh.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@liviaerxin
liviaerxin / simple_vpn_server_setting.md
Last active September 2, 2024 11:47
Simple VPN Server #vpn

VPN Server Setting

ocserv

# 
docker run --name ocserv --privileged -p 443:443 -p 443:443/udp -d tommylau/ocserv
# set username/password
docker exec -it ocserv ocpasswd -c /etc/ocserv/ocpasswd -g "Route,All" frank
# delete user
/***************************************************************************
*
*
* chase appeared in Creative Computing
* magazine way back in 1976. According
* to the book "More BASIC Computer Games"
* it was written by Mac Oglesby, with
* improvements by Bill Cotter and Arnold
* Loveridge.
* This version, in C, was written by