Skip to content

Instantly share code, notes, and snippets.

View albertogallardo's full-sized avatar
:octocat:
Coding...

Alberto Gallardo albertogallardo

:octocat:
Coding...
  • Barcelona
View GitHub Profile
@albertogallardo
albertogallardo / ssh-multi.sh
Created July 28, 2022 15:34 — forked from dmytro/ssh-multi.sh
Start multiple synchronized SSH connections with Tmux
#!/bin/bash
# ssh-multi
# D.Kovalov
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# a script to ssh multiple servers over multiple tmux panes
starttmux() {
if [ -z "$HOSTS" ]; then
@albertogallardo
albertogallardo / ssh-multi.sh
Created July 28, 2022 15:34 — forked from johnko/ssh-multi.sh
a script to ssh multiple servers over multiple tmux panes
#!/bin/sh
# ssh-multi
# D.Kovalov
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# Modified by johnko https://gist.github.com/johnko/a8481db6a83ec5ea2f37
# a script to ssh multiple servers over multiple tmux panes
starttmux() {

Publics repos

With Ruby 1.8 (default version on MacOS) :

sudo gem install json
curl -s https://api.github.com/orgs/[ORGANIZATION]/repos | ruby -rubygems -e 'require “json”; JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["ssh_url"]} ]}'

With Ruby 1.9+, the json library is by default thus you just use :