Skip to content

Instantly share code, notes, and snippets.

View ashish-ad's full-sized avatar
🌐
Working from home

Ashish Pradhan ashish-ad

🌐
Working from home
View GitHub Profile
@ashish-ad
ashish-ad / create_extension_list.sh
Last active December 19, 2021 15:45
Vs code extension sharing
#!/bin/sh -e
code --list-extensions > vscode-extensions.txt
@ashish-ad
ashish-ad / extensions.txt
Created December 19, 2021 15:24
My VScode Extension list file
��adamvoss.vscode-languagetool
adamvoss.vscode-languagetool-en
AffenWiesel.matlab-formatter
alefragnani.rtf
apommel.matlab-interactive-terminal
austin.code-gnu-global
bat67.matlab-extension-pack
bierner.markdown-preview-github-styles
blackmist.LinkCheckMD
bramvanbilsen.matlab-code-run
@ashish-ad
ashish-ad / Configure_script.sh
Last active May 1, 2022 08:12
Customizing terminal
#! /bin/bash
# This will terminate the script if the script fails in
# between somewhere
set -e
# This will install the ZSH in the system
sudo apt install zsh
# This will change the from BASH to ZSH
@ashish-ad
ashish-ad / class_intro.ipynb
Last active February 14, 2022 11:50
OOPs in python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ashish-ad
ashish-ad / Git_config.md
Last active June 24, 2022 04:34
Commands for configuring git when using SSH in git and saving git ssh keygen to system

Configuring credential.helper

On OS X (now macOS), run this in terminal:

git config --global credential.helper osxkeychain

It enables Git to use file Keychain.app to store username and password and to retrieve the passphrase to your private SSH key from the keychain.

For Windows use:

{
"kite.showWelcomeNotificationOnStartup": false,
"python.pythonPath": "C:\\Users\\ashis\\AppData\\Local\\Programs\\Python\\Python310\\python.exe",
"C_Cpp.updateChannel": "Insiders",
"code-runner.runInTerminal": true,
"workbench.iconTheme": "material-icon-theme",
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
"files.autoSave": "afterDelay",
"C_Cpp.debugger.useBacktickCommandSubstitution": true,
"workbench.settings.useSplitJSON": true,

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

@ashish-ad
ashish-ad / edit_commit_history.md
Created February 6, 2024 09:14 — forked from amalmurali47/edit_commit_history.md
Change ownership of selected older commits in Git
  1. Clone the repo.
  2. Use git rebase -i --root
  3. vim will open. Select the commits you want to modify by changing pick to edit. If you would like to change all the commits, enable line numbers with set nu and perform the following replace: :1,Ns/pick/edit/g (where N is the line number of the last line)
  4. You will now be shown all the selected commits one by one. Each commit message will be displayed. You have two options:
    • If you would like to keep the commit author details the same, do a git rebase --continue.
    • If you would like to change it to a different name/email, do git commit --amend --reset-author. If --reset-author is specified, it will use the details from your git config. (If you need to specify an alternate name/email, you can do so with --author="John Doe <john@example.com>". If you would like to change the time to a previous date, you can do so with --date "2 days ago".)
  5. Do the same for all the commits and finish the rebase.
  6. Perform `git push -f origin ma