Skip to content

Instantly share code, notes, and snippets.

View ArnabXD's full-sized avatar
:octocat:
rethinking

Arnab Paryali ArnabXD

:octocat:
rethinking
View GitHub Profile
@phortuin
phortuin / signing-git-commits.md
Last active April 29, 2024 12:43
Set up a GPG key for signing Git commits on MacOS (M1)

Based on this blogpost.

To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.

Setting up

Install with Homebrew:

$ brew install gpg
@New-dev0
New-dev0 / TeleToPyroSTRING.py
Last active January 3, 2024 11:30
Script to Convert Telethon's StringSession to Pyrogram's
# Both Telethon and Pyrogram should be Installed
# Made only for Educational Purpose
# New-dev0 (2021)
import struct, base64
from telethon.sessions.string import StringSession
from telethon.sync import TelegramClient
from pyrogram.storage.storage import Storage
from pyrogram import utils
@simon04
simon04 / git.sh
Created January 14, 2020 07:16
Git merge/replace orphan branch into master
git checkout --orphan new-framework
# completely rewrite your application in new framework
git merge --strategy=ours --allow-unrelated-histories master
git commit-tree -p HEAD^2 -p HEAD^1 -m "Merge branch 'new-framework'" "HEAD^{tree}"
git reset --hard $OUTPUT_FROM_PREVIOUS_COMMAND
git checkout master
git merge --ff-only new-framework
ffmpeg -i data/video.mp4 -vcodec h264 -b:v 1000k -acodec mp2 data/output.mp4
#!/usr/bin/env node
"use strict";
console.log("This is pid " + process.pid);
setTimeout(function () {
process.on("exit", function () {
require("child_process").spawn(process.argv.shift(), process.argv, {
cwd: process.cwd(),