Skip to content

Instantly share code, notes, and snippets.

@ewieberappc
ewieberappc / soap
Last active December 5, 2017 21:23
Clean your system of the Appcelerator and/or Titanium environment
if [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]]; then echo -e '\n Usage: '$'\e[36m''soap [options]'$'\e[0m''\n\n Cleans your system of the Appcelerator/Titanium environment, prompting to confirm removal of each component\n\n Options:\n\n\t-f, --force\t'$'\e[36m''Cleans all parts of the Appcelerator/Titanium environment, without prompting for confirmation'$'\e[0m''\n\t-h, --help\t'$'\e[36m''Output usage information\n'$'\e[0m'; exit; fi; sudo echo; WD=$(pwd); cd; FORCE=false; if [[ "$1" == "-f" ]] || [[ "$1" == "--force" ]]; then FORCE=true; fi; if [ -e /Applications/Appcelerator\ Studio/configuration/config.ini ]; then ALOC="$(sed -n 's/.*osgi.instance.area.default=\(.*\)/\1/1p' /Applications/Appcelerator\ Studio/configuration/config.ini )"; ALOC=${ALOC/@user.home/~}; if $FORCE; then sudo rm -rf $ALOC; echo -e $'\e[32m''\tAppcelerator Workspace removed'$'\e[0m'; else read -p $'\e[32m''?'$'\e[0m'' Remove Appcelerator workspace: '$'\e[36m'$ALOC$'\e[0m'' ? (y/N) ' -r; if [[ ! $REPLY =~ ^[Yy]$ ]]; then echo -e $'\
@ewieberappc
ewieberappc / Share Extension
Last active September 14, 2018 16:36
A basic Share Extension Test created by combining two simple test cases. Contains the ShareViewController for the extension and the index controller and view for the Titanium Project
A basic Share Extension Test created by combining two simple test cases. Contains the ShareViewController for the extension and the index controller and view for the Titanium Project
@ewieberappc
ewieberappc / Appc Jira Search
Last active September 14, 2018 16:38
Search JIRA and open tickets from the command line
@ewieberappc
ewieberappc / GoTo
Last active September 14, 2018 16:43
Add shortcuts/names to paths for quick navigation.
GoTo allows you to set a nickname/shortcut to a path so that you can easily navigate to it later.
USAGE:
$ goto [options] - CDs to your previous location
$ goto <name> [options] - CDs to the location saved in the goto shortcut <name>. Prompts to set the shortcut if it is not already set
OPTIONS:
-o, --open - CDs to the location saved in the goto shortcut <name> and opens the location in finder. Prompts to set the shortcut if it is not already set
-oo, --open-only - Opens the location saved in the goto shortcut <name> in finder. Prompts to set the shortcut if it is not already set
@ewieberappc
ewieberappc / Appc What Am I
Last active September 15, 2018 04:41
Print out your Appc CLI environment
USAGE:
$ whatami [options] - Prints your Appcelerator environment
OPTIONS:
-t, --ticket - Prints a shorter format of your versions (local only) and copies the output to your clipboard for posting in tickets.
-p, --print - Prints the output from the last time the '--ticket' option was used
-c, --compare - Compares your current environment to your past environment (the last time the '--ticket' option was used)
INSTALLATION:
1. Download the executable file to a folder (recommended '~/bin')
@ewieberappc
ewieberappc / Autofill, Password Suggestion, and One Time Codes
Last active February 12, 2019 04:05
Example code to use iOS 12 Credential Autofill, Password Suggestion, and One Time Code features.
Example code to use iOS 12 Credential Autofill, Password Suggestion, and One Time Code features.
1. The app ID used in your provisioning profile has to have associated domains enabled.
2. Make sure you configure your tiapp.xml.
3. Your website that you are logging into through the app must have an apple-app-site-association file in the root or in its .well-known directory.
4. On your device, you can have some saved credentials in Settings -> Passwords & Accounts -> Website & App Passwords.
@ewieberappc
ewieberappc / Siri Shortcuts
Last active February 12, 2019 04:05
Shortcuts in iOS 12 give Siri the hooks to incorporate deep app features into your Shortcut workflows. Here is an example.
Shortcuts in iOS 12 give Siri the hooks to incorporate deep app features into your Shortcut workflows. Here is an example.
1. Make sure you configure your tiapp.xml
2. You can then create a shortcut in Settings -> Siri & Search to perform an action in your app.
@ewieberappc
ewieberappc / Grouped Notifications
Last active March 29, 2019 15:17
iOS 12 introduces Notification Grouping, a feature that groups all of the notifications from a single app together in one bundle that prevents the Lock screen from becoming cluttered. This is how you can use it in your app.
iOS 12 introduces Notification Grouping, a feature that groups all of the notifications from a single app together in one bundle that prevents the Lock screen from becoming cluttered. This is how you can use it in your app.
@ewieberappc
ewieberappc / Appc Verbose
Last active March 29, 2019 15:18
Re-run previous commands with Appc CLI debugging options
USAGE:
$ verbose - Run the previous command with 'DEBUG=*' and '-l trace'
$ verbose <number> - Run the command from <number> commands ago with 'DEBUG=*' and '-l trace'
$ verbose <string> - Run the last command containing <string> with 'DEBUG=*' and '-l trace'
INSTALLATION:
1. Download the executable file to a folder (recommended '~/bin')
2. Add the path to the folder to your PATH in your .bash_profile (export PATH=$PATH:~/bin)
3. Add an alias to your .bash_profile to run the command in the current shell: ( verbose(){ . .verbose $@; } )
4. Restart your terminal or run '. ~/.bash_profile'