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 | |
| #@ Copyright: © 2011 Chris F.A. Johnson | |
| #@ Released under the terms of the GNU General Public License V2 | |
| #@ See the file COPYING for the full license | |
| # Originally from http://cfajohnson.com/shell/listing1.txt | |
| # Hacked to be completely different by George Nachman | |
| if [ ! -t 1 ] ; then | |
| # WARNING * THIS IS A HACK * IT MIGHT BREAK * THERE BE DRAGONS HERE * DO NOT USE IF YOU CARE FOR CORRECTNESS | |
| "$0" < /dev/tty > /dev/tty |
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
| # bash/zsh completion support for core Git. | |
| # | |
| # Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
| # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
| # Distributed under the GNU General Public License, version 2.0. | |
| # | |
| # The contained completion routines provide support for completing: | |
| # | |
| # *) local and remote branch names | |
| # *) local and remote tag names |
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
| H4sIAPmefFcAA908a3fbtpLf/StQRqmkrKXEdh/b6ri5ju22PieJs7bTx0l8FYqELNYSqfJh2Unz33ce | |
| AAjwIdnd3i+b08YxCQwGg3nPgI++eDqJ4qcTP5ttPRIXsygT8B/8KkORxMJbplLeymCIAzwxKXJ8HRRZ | |
| niyijzBmmqQiupDpYne4BQBeJ7n8XuQIZpGExVyKVP5ZRKnMxC5CnYmp9PMCf1/NomAm7pJCLACciJNc | |
| JPlMpqsok2IiAViRRfEVQpPCOzp+8fYnT+Spv9wWfhzy0zdnp6/eXIwPT1+9Onh95IkbP438yVwOhYhy | |
| RGqs8B9HcZb78zlAXUXzuUhuZJpGoUQwsBwCjKaEjHmTxPB/SusQXryrMU4fi0kq/WvasSbZdZysYpEn | |
| IiuWyyTNabd7gCvsVMKK8PPJIsny+d0TZ8ju8NnXE8D3JAdgMxg1kRLgyCwH6q6ifEYYhHLqF/NcZDOA | |
| leHJvPKD03Pxm9h5NvxKeBfRlUy9bfF2UsR5Ib4e7jwDcN4L2P3HO/HCD53X3wyffQMk9ZdL2NZR6l9L | |
| j4lq3u88E95xeHUnjqe5R/vMF8UtjcmCFDH0U0lnpvYiw5GQN/CcDo1wphkzP7hGqlzJXMgs8Jd4sEES | |
| AgMs/Qy5LJ+lSXE12xZxUKQZPI9iOLqpRB7RB41vkNGyuAsMGNOzNLqaIc2Wcz+AE8x5zWgh4ei7VejD | |
| LTjed++E17k4PnvliS/29T6+/BIenuDT8fnPxy9fjk9eXxz/dHZwcXL6Gv59fnHw8uUxsNa+8DwePIBf |
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
| #!/usr/bin/python | |
| import re | |
| import sys | |
| import os | |
| def ReadUntilPrefix(prefix): | |
| k = 0 | |
| buff = '' | |
| while True: | |
| buff += sys.stdin.read(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
| Process: Tower [69036] | |
| Path: /Users/USER/Downloads/Tower.app/Contents/MacOS/Tower | |
| Identifier: com.fournova.Tower2 | |
| Version: 2.3.4 (305) | |
| Code Type: X86-64 (Native) | |
| Parent Process: ??? [1] | |
| Responsible: Tower [69036] | |
| User ID: 501 | |
| Date/Time: 2016-06-03 14:53:27.683 -0700 |
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
| rdi=self | |
| rsi=selector | |
| rdx=array of events | |
| dx 1st arg | |
| cx 2nd arg | |
| r8 3rd arg | |
| r9 4th arg | |
| local vars: |
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
| set itermRunning to (application "iTerm" is running) | |
| set scriptPath to quoted form of POSIX path of ((path to me as text) & "::" & "start.sh") | |
| set user_shell to do shell script "dscl /Search -read /Users/$USER UserShell | awk '{print $2}'" | |
| tell application "iTerm" | |
| activate | |
| if not (exists window 1) or (itermRunning = false) then | |
| reopen | |
| end if |
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
| if [[ -o login ]]; then | |
| if [ x"$TERM" != "xscreen" ]; then | |
| # Indicates start of command output. Runs just before command executes. | |
| iterm2_before_cmd_executes() { | |
| printf "(before-cmd)\033]133;C;\r\007(/before-cmd)" | |
| } | |
| iterm2_set_user_var() { | |
| printf "(set-var)\033]1337;SetUserVar=%s=%s\007(/set-var)" "$1" $(printf "%s" "$2" | base64) | |
| } |
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
| on write_to_file(this_data, target_file, append_data) | |
| try | |
| set the target_file to the target_file as string | |
| set the open_target_file to open for access file target_file with write permission | |
| if append_data is false then set eof of the open_target_file to 0 | |
| write this_data to the open_target_file starting at eof | |
| close access the open_target_file | |
| return true | |
| on error | |
| try |
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 | |
| # This is based on "preexec.bash" but is customized for iTerm2. | |
| # Note: this module requires 2 bash features which you must not otherwise be | |
| # using: the "DEBUG" trap, and the "PROMPT_COMMAND" variable. iterm2_preexec_install | |
| # will override these and if you override one or the other this _will_ break. | |
| # This is known to support bash3, as well as *mostly* support bash2.05b. It | |
| # has been tested with the default shells on MacOS X 10.4 "Tiger", Ubuntu 5.10 | |
| # "Breezy Badger", Ubuntu 6.06 "Dapper Drake", and Ubuntu 6.10 "Edgy Eft". |