Skip to content

Instantly share code, notes, and snippets.

View karancode's full-sized avatar
:octocat:
day 1

Karan Thanvi karancode

:octocat:
day 1
View GitHub Profile
@timesler
timesler / deploy_dolly_v2.ipynb
Created April 21, 2023 23:03
Deploy Dolly v2.0 to SageMaker
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@karancode
karancode / git-update-user-info-after-commit
Created May 1, 2020 06:00
force update your git username and email after commits have been pushed with undesired user info.
$ git filter-branch -f --env-filter "GIT_AUTHOR_NAME='<new_username>'; GIT_AUTHOR_EMAIL='<new_email>'; GIT_COMMITTER_NAME='<new_username>'; GIT_COMMITTER_EMAIL='<new_email>';" HEAD
$ git push -f
@karancode
karancode / duplicate_all.sh
Created March 3, 2020 22:29
Duplicate all the files in a directory with different name (appended string, etc.)
# Let's say you've .yaml.j2 files in a directory and
# you want to make copy for each file, for ex:
# files you have : config1.yml.j2 config2.yml.j2 porperties1.yml.j2 setup.yml.j2
# files you want : config1.yml.j2 config1_new.yml.j2 config2.yml.j2 config2_new.yml.j2 porperties1.yml.j2 porperties1_new.yml.j2 setup.yml.j2 setup_new.yml.j2
for filename in *.yml.j2; do mv $filename ${filename%.yaml.j2}_new.yml.j2; done