# Please define variables
packageName=<packageName>
packageVersion=<packageVersion>
# Create a new tab
brew tap-new local/$packageName
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
sed "$(( $RANDOM % 4 + 1))q;d" ~/values.txt |
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
curl "http://localhost:$1/streaming/channelsz?channel=$2&subs=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
tmux new-session -d -s $1 -c $2 |
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
case $1 in | |
start) | |
autossh -f -M 0 -Nn -D 127.0.0.1:2431 jumpbox.prod.gcp.uw.systems | |
autossh -f -M 0 -Nn -D 127.0.0.1:2430 jumpbox.dev.gcp.uw.systems | |
autossh -f -M 0 -Nn -D 127.0.0.1:2429 jumpbox.prod.uw.systems | |
autossh -f -M 0 -Nn -D 127.0.0.1:2428 jumpbox.dev.uw.systems | |
;; | |
stop) | |
ps aux | rg 'autossh.*uw\.systems' | cut -d ' ' -f 2 | xargs kill | |
;; |
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 -g prefix C-b | |
bind-key -n C-b send-prefix | |
setw -g monitor-activity on | |
# Act like Vim | |
set-window-option -g mode-keys vi | |
bind-key h select-pane -L | |
bind-key j select-pane -D | |
bind-key k select-pane -U |
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
func (n *natsEventSource) allEvents(callback func(eventWithTs) error) { | |
errChan := make(chan error, 1) | |
tick := make(chan struct{}) | |
timeout := time.Duration(n.config.messageTimeout) * time.Second | |
msgHandler := func(m *stan.Msg) { | |
evt, err := unmarshalEventWithTs(m.Data) | |
if err != nil { | |
errChan <- errors.Wrap(err, fmt.Sprintf("unmarshalling msg with seqno: %d", m.Sequence)) | |
return | |
} |
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
package s3repo | |
import ( | |
"context" | |
"log" | |
"sync" | |
"github.com/pkg/errors" | |
) |
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
let mut output: Box<io::Write> = match matches.value_of("out") { | |
Some(o) if o == "-" => Box::new(io::stdout()), | |
Some(o) => Box::new(File::create(&Path::new(o)).unwrap()), | |
None => Box::new(io::stdout()), | |
}; |
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
protoc -I $GOPATH/src -I $PWD --gogoslick_out=Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,import_path=commission_results:. commission_events.proto |
NewerOlder