| Function | Shortcut |
|---|---|
| New Tab | ⌘ + T |
| Close Tab or Window | ⌘ + W (same as many mac apps) |
| Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
| Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
| Cycle iTerm Windows | ⌘ + backtick (true of all mac apps and works with desktops/mission control) |
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 | |
| script_name=`basename "$0"` | |
| text_bold=$(tput bold) | |
| text_normal=$(tput sgr0) | |
| showHelp() { | |
| echo -e "${script_name} | |
| ${text_bold}DESCRIPTION${text_normal} |
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
| # Generated by Powerlevel10k configuration wizard on 2020-02-11 at 01:01 UTC. | |
| # Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 05731. | |
| # Wizard options: awesome-fontconfig + powerline, small icons, rainbow, time, | |
| # angled separators, blurred heads, sharp tails, 2 lines, disconnected, full frame, | |
| # darkest-ornaments, sparse, few icons, concise, instant_prompt=verbose. | |
| # Type `p10k configure` to generate another config. | |
| # | |
| # Config for Powerlevel10k with powerline prompt style with colorful background. | |
| # Type `p10k configure` to generate your own config based on it. | |
| # |
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/sh | |
| ECHO='echo ' | |
| for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$'); do | |
| if [[ "$(git log $branch --since "6 months ago" | wc -l)" -eq 0 ]]; then | |
| if [[ "$DRY_RUN" = "false" ]]; then | |
| ECHO="" | |
| fi | |
| local_branch_name=$(echo "$branch" | sed 's/remotes\/origin\///') | |
| $ECHO git branch -d $local_branch_name |
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
| DROP PROCEDURE IF EXISTS moveTables; | |
| DROP PROCEDURE IF EXISTS renameDatabase; | |
| DELIMITER $$ | |
| CREATE PROCEDURE moveTables(_schemaName varchar(100), _newSchemaName varchar(100)) | |
| BEGIN | |
| DECLARE done INT DEFAULT FALSE; | |
| DECLARE table_name VARCHAR(64); | |
| DECLARE table_cursor CURSOR FOR SELECT information_schema.tables.table_name FROM information_schema.tables | |
| WHERE information_schema.tables.table_schema = _schemaName; |
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/sh | |
| # | |
| # A githook script to prepare the commit log message. | |
| # It adds the branch name to the commit message (based on name pattern), if it is not already part of it. | |
| # Branch name pattern is configured in regex variable. | |
| branchPath=$(git symbolic-ref -q HEAD) # Somthing like refs/heads/myBranchName | |
| branchName=${branchPath##*/} # Get text behind the last / of the branch path | |
| # update the regex pattern to match with the project |
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
| <?php | |
| use Illuminate\Support\Facades\Schema; | |
| use Illuminate\Database\Schema\Blueprint; | |
| use Illuminate\Database\Migrations\Migration; | |
| class LaravelConditionalIndexMigration extends Migration | |
| { | |
| /** | |
| * Run the migrations. |
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just