Skip to content

Instantly share code, notes, and snippets.

@kerembaydogan
kerembaydogan / change_commit_message.sh
Last active April 20, 2021 14:03
Change Commit Message Of Most Recent Commit (Already Pushed)
#If it is the most recent commit, you can simply do this in 2 steps:
git commit --amend -m "modified commit message" (amend message)
git push --progress origin --force (force push)
# Be careful using --force or -f! Bad things might happen...
# Force pushing is strongly discouraged since this changes the history of your repository.
# If you force push, people who have already cloned your repository will have to manually fix their local history.
// CONVERT ALL M4A FILES TO WAV USING FFMPEG
for f in *.m4a; do ffmpeg -i "$f" "${f/%m4a/wav}"; done
@kerembaydogan
kerembaydogan / CocoaPodsCleanInstall.sh
Created March 1, 2020 02:36
CocoaPods Clean Install
// cd to xcode project root folder and run
rm -rf ~/Library/Caches/CocoaPods Pods ~/Library/Developer/Xcode/DerivedData/*; pod deintegrate; pod setup; pod install;
@kerembaydogan
kerembaydogan / GitBringBackDeletedFiles.sh
Created February 27, 2020 18:23
Git Bring Back Deleted Files
## run this line
## find the file you are searching for
## note output ex: 'delete mode 100755 folder1/folder2/deletedFile.xml'
git log --diff-filter=D --summary | grep delete
## run this line
## note output ex: 'a0f533730f4255b0c8f36d9f2594b4aed5e772ce'
git rev-list -n 1 HEAD -- folder1/folder2/deletedFile.xml
# source: https://github.com/whomwah/qlstephen/issues/23
## run this line, if output looks like dyn.* it means no uti is defined for *.meta
mdls -name kMDItemContentType example.meta
## note dyn output
dyn.ah62d4rv4ge8043pyqe
## edit QLStephen.qlgenerator/Contents/Info.plist
## add dyn.ah62d4rv4ge8043pyqe to LSItemContentTypes array.
@kerembaydogan
kerembaydogan / delete-ds-store-files
Created November 11, 2017 13:13
Recursively Delete .DS_Store
$ find . -name '.DS_Store' -type f -delete