Skip to content

Instantly share code, notes, and snippets.

View abhishekpatel946's full-sized avatar
🎯
Focusing

Abhishek Patel abhishekpatel946

🎯
Focusing
View GitHub Profile
@abhishekpatel946
abhishekpatel946 / handling_multiple_github_accounts.md
Last active October 6, 2023 09:20
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

# fixing broken packages & configure them
$ sudo dpkg --configure -a
# after rapairing packages install them forcefully
$ sudo apt-get install -f
######## Documenation for Ngrok Server Conf & Maintence ########
# start the local server at http 80 - just for the http tunneling
./ngrok http 80
# start the file server - for sharing any type of file over internet
./ngrok file:///root/<source path>
## start the server using authentication
@abhishekpatel946
abhishekpatel946 / command.py
Last active November 5, 2022 11:35
Change the auther details(like author_name, author_email) from previous commits in a single command. (NOTE: Make it a singlural line before paste on terminal)
git filter-branch --env-filter 'if [ "$GIT_AUTHOR_EMAIL" = "<INCORRECT-EMAIL>" ];
then GIT_AUTHOR_EMAIL=<CORRECT-EMAIL>;
GIT_AUTHOR_NAME="<CORRECT-AUTHOR-NAME>";
GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL;
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; fi' -- --all
@abhishekpatel946
abhishekpatel946 / FacebookPixel.ts
Created August 27, 2022 06:26
A tiny open-source facebook pixel custom plugin support for analytics. https://getanalytics.io/
type Config = {
pixelId: string
enabled: boolean
}
let fb: any
let fbLoaded = false
export default function facebookPixel(config: Config) {
return {
name: 'facebook-pixel',
@abhishekpatel946
abhishekpatel946 / PosthogPlugin.ts
Last active April 14, 2023 03:10
A tiny open-source posthog custom plugin for analytics support. https://getanalytics.io/
import posthog from 'posthog-js'
import { env } from '../../configs'
type Config = {
token: string
enabled: boolean
}
export default function postHog(config: Config) {