Skip to content

Instantly share code, notes, and snippets.

View rjmacarthy's full-sized avatar
🎮
The Tetris effect

rjmacarthy rjmacarthy

🎮
The Tetris effect
View GitHub Profile
@rjmacarthy
rjmacarthy / delete_git_submodule.md
Created April 19, 2021 11:33 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@rjmacarthy
rjmacarthy / deploy-keys.md
Created May 5, 2020 11:06 — forked from holmberd/deploy-keys.md
Setup GitHub repository SSH deploy keys

Setup GitHub repository SSH deploy keys

  1. Create GitHub repository in github and save the SSH repository url

  2. Init git on server in code directory

  • git init
  1. Create SSH keys on the server
  • ssh-keygen -t rsa -b 4096 -C your@email.here
  • Rename the key that doesn't end with .pub to repo-name.deploy.pem
@rjmacarthy
rjmacarthy / rename_js_files.sh
Created September 4, 2019 10:56 — forked from afternoon/rename_js_files.sh
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;