This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| extension String { | |
| func regex(_ pattern: String) -> Bool { | |
| return self.range(of: pattern, options: .regularExpression) != nil | |
| } | |
| } | |
| let pattern = "http[s]?://[w]*.?booking.com.*aid=[0-9]+" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch FILE_TO_DELETE' --prune-empty --tag-name-filter cat -- --all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| hdiutil create -fs HFS+ -srcfolder "$1" -volname "$(basename $1)" "$1.dmg" | |
| tar -cjf "$1.tar.bz2" -C "$(dirname $1)" "$(basename $1)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| osascript -e "tell application \"Finder\" to set label index of alias POSIX file \"$1\" to 2" |
OlderNewer