Skip to content

Instantly share code, notes, and snippets.

@JoyBrad
JoyBrad / fix-duplicate-names-in-zip.sh
Last active August 24, 2022 07:41
Shell script to fix weird characters in folder/filenames and remove duplicate entries
#!/bin/bash
# This script was created for fixing zip files downloaded from using (https://github.com/dulldusk/phpfm/)
# This is a known issue but not fixed yet (https://github.com/dulldusk/phpfm/issues/27)
# The problem I have faced so far is that the php program replaces all _ characters with some unicode character ž and that
# all folders are accompanied by extra files with the same name (as mentioned in the issue page also)
# Requires: bash, 7z, zip
# Usage: make it executable ofcourse, and
# ./fix-duplicate-names-in-zip.sh test.zip
@JoyBrad
JoyBrad / .bash_prompt
Last active May 9, 2022 06:10 — forked from kfcobrien/.BASH-PROMPT.png
Clean informative bash prompt with git info
#echo $PWD
# enable git-prompt only if you're in a git repo
is_git()
{
git rev-parse --git-dir &>/dev/null
status=$?