brew install tmux
Run tmux -CC
or tmux -CC attach
in iTerm2 and then menu is shown on terminal:
- ESC to detach
- C to run commands
- X to force quit
- L for log
#!/usr/bin/env sh | |
# Example: ./download_minio.sh example.url.com username password bucket-name minio/path/to/file.txt.zst /download/path/to/file.txt.zst | |
if [ -z $1 ]; then | |
echo "You have NOT specified a MINIO URL!" | |
exit 1 | |
fi | |
if [ -z $2 ]; then |
brew install tmux
Run tmux -CC
or tmux -CC attach
in iTerm2 and then menu is shown on terminal:
brew install tmux
Run tmux -CC
or tmux -CC attach
in iTerm2 and then menu is shown on terminal:
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"syscall" | |
) | |
func main() { |
#!/usr/bin/python | |
"""Convert all of your Viscosity connections into OVPN configuration files for OpenVPN | |
https://gist.github.com/ishahid/693c2c97b3236a3c2416fc09ab170244 | |
""" | |
import re | |
import glob | |
from os.path import expanduser, dirname |
#!/usr/bin/env python | |
from google.cloud import monitoring | |
''' | |
# Using a service account with credentials in a json file: | |
JSON_CREDS = '/path/to/json' | |
from oauth2client.service_account import ServiceAccountCredentials | |
scopes = ["https://www.googleapis.com/auth/monitoring",] | |
credentials = ServiceAccountCredentials.from_json_keyfile_name( |
#!/bin/bash | |
for i in $(find . -type d -maxdepth 1 -mindepth 1); do | |
echo "Backup $i..." | |
zip_name="$i-$(date +'%y%m%d').zip" | |
pushd "$i" && \ | |
git archive --format=zip --output="/opt/backups/$zip_name" master && \ | |
popd | |
done |
I can never find a great guide on this stuff, so these are more like notes to myself.
The goal here is to have a virtualbox running more or less headless. An ssh client is used separately to actually use the machine. I've found it to be fantastic for a quick dev setup.
Assumes you have a vbox setup with Ubuntu server (this will work for 16.04) ready to go.
My typical setup for a development box in VirtualBox uses two NICs. The first uses NAT to allow the box to communicate with the outside world through my host computer’s network connection. (NAT is the default, so shouldn't require any setup.) The second is a "host-only" connection that allows my host and guest to interact.
To create a host-only connection in VirtualBox, start by opening the preferences in VirtualBox. Go to the "Network" tab, and addd a Host-only Network. Modify the host-only network, and disable DHCP. Make a note of the IP address. (Feel free to set the IP address as well, if you like.)
Next, assign this host-only adapter to the virtual machine. Select the VM and press "Settings". Go to the "Network" tab, and select "Adpater 2". Enable the adapter, set it to a "Host-only Adapter", and select the adpater you created above.