git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| #! /bin/sh | |
| find . -name "*.nib" -type d | awk '{sub(/.nib/,"");print}' | xargs -I % ibtool --write %.xib --upgrade %.nib |
| #! /bin/sh | |
| find . -name "*.xib" -type f | awk '{sub(/.xib/,"");print}' | xargs -I % ibtool --compile %.nib %.xib |
| #!/bin/bash | |
| if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
| appify v3.0.1 for Mac OS X - http://mths.be/appify | |
| Creates the simplest possible Mac app from a shell script. | |
| Appify takes a shell script as its first argument: | |
| `basename "$0"` my-script.sh |
| """ | |
| HexByteConversion | |
| Convert a byte string to it's hex representation for output or visa versa. | |
| ByteToHex converts byte string "\xFF\xFE\x00\x01" to the string "FF FE 00 01" | |
| HexToByte converts string "FF FE 00 01" to the byte string "\xFF\xFE\x00\x01" | |
| """ | |
| #------------------------------------------------------------------------------- |
| #!/usr/bin/python | |
| import plistlib | |
| import os | |
| import commands | |
| import argparse | |
| DEVELOPER_DIR = commands.getoutput('/usr/bin/xcode-select -print-path') | |
| PLATFORMS_DIRECTORY = os.path.join(DEVELOPER_DIR, "Platforms") | |
| IPHONE_PLATFORM = "iPhoneOS.platform" |
| #!/bin/bash | |
| XIBS="*.xib | |
| app/*.xib | |
| interfaces/*.xib | |
| resources/*.xib" | |
| for i in $XIBS | |
| do | |
| echo "Compiling `basename $i`..." | |
| ibtool --compile resources/`basename -s .xib $i`.nib $i |
| public class Main { | |
| public static void main(String[] args) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, IOException { | |
| final SecretKeySpec keySpec = new SecretKeySpec("4j#e*F9+Ms%|g1~5.3rH!we,".getBytes(), "AES"); | |
| final Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding"); | |
| cipher.init(Cipher.DECRYPT_MODE, keySpec); | |
| FileUtils.writeByteArrayToFile(new File("msgstore.db"), cipher.doFinal(FileUtils.readFileToByteArray(new File("msgstore.db.crypt")))); | |
| } | |
| } |
| #!/bin/sh | |
| # 2021-12-09: | |
| # This script is no longer supported! | |
| # Apple broke all direct downloads without logging with an Apple ID first. | |
| # The number of hoops that a script would need to jump through to login, | |
| # store cookies, and download is prohibitive. | |
| # Now we all must manually download and mirror the files for this to work at all :'-( | |
| OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $2}') |
Copied from https://github.com/sindresorhus/guides/blob/master/how-not-to-rm-yourself.md
The rm command is inherently dangerous and should not be used directly. It can at worst let you accidentally remove everything. Here's how you can protect you from yourself.
The trash command-line tool will move stuff to the trash instead of permanently deleting it. You should not alias rm to trash as it will break external scripts relaying on the behavior of rm. Instead use it directly: trash image.jpg.