(0|\+98)?([ ]|,|-|[()]){0,2}9[1|2|3|4]([ ]|,|-|[()]){0,2}(?:[0-9]([ ]|,|-|[()]){0,2}){8}
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
| # You need to give this file permission to execute by doing the following... | |
| # chmod +x f.sh | |
| # Add an alias named f to your .zshrc file like this: | |
| # alias f="/Users/brad/Documents/shell-scripts/f.sh" | |
| code "$(find ~/Documents ~/Desktop ~/Sites ~/Local\ Sites -type d \( -name "node_modules" -o -name ".next" -o -name ".git" -o -name "vendor" -o -name "wp-includes" -o -name "wp-admin" \) -prune -o -type d | fzf)" | |
| # todo someday | |
| # currently it only searches for folders, but it would be nice if I could search for zshrc or specific files, but I'm not sure if that will include too many files and be slow... |
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
| function get_cached_external_json($url) { | |
| $transient_key = 'our_fetched_json_' . md5($url); | |
| $option_key = 'our_fetched_json_backup_' . md5($url); | |
| $cached_data = get_transient($transient_key); | |
| if (false !== $cached_data) { | |
| return $cached_data; | |
| } |