Skip to content

Instantly share code, notes, and snippets.

View rojenzaman's full-sized avatar

Rojen Zaman rojenzaman

  • localhost
  • Istanbul, Turkey
  • 12:53 (UTC +03:00)
View GitHub Profile
rojenzaman /
Created February 4, 2024 15:37 — forked from bjmiller121/
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:

rojenzaman /
Created April 22, 2022 09:46 — forked from pascalpoitras/
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

The squares in the chanmon buffer at the top of weechat in the gif above are there only to hide the nicknames and the messages in the gif to respect users privacies

You need at least WeeChat 3.5-dev

Enable mouse

/mouse enable
rojenzaman / gist:63597da2a52e8733d6e502672da3b082
Created June 13, 2021 21:47 — forked from cdown/gist:1163649
Bash urlencode and urldecode
View gist:63597da2a52e8733d6e502672da3b082
urlencode() {
# urlencode <string>
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in
rojenzaman / httpstatus
Last active June 27, 2021 16:38 — forked from rsvp/httpstatus
httpstatus : bash script to get HTTP response code with optional status message (includes return true or false)
View httpstatus
if [ "$#" -lt 1 ]; then
echo "Usage: ./`basename $0` URL"
exit 1
function unknown_status() {
rojenzaman / answerfile
Last active July 1, 2021 22:29 — forked from oofnikj/answerfile
Install Docker on Termux
View answerfile
HOSTNAMEOPTS="-n alpine"
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
# taken from
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
rojenzaman / dynmotd
Last active June 9, 2023 21:17 — forked from cha55son/dynmotd
RHEL (Centos/Fedora) dynamic motd
View dynmotd
# Installation:
# 1. nano /etc/ssh/sshd_config
# PrintMotd no
# 2. nano /etc/profile
# /usr/bin/dynmotd # Place at the bottom
View gist:7d7283f69c44c9cfc4365d2caf09a7cf
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\n",
"sources" : [ "" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "" ],