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/env python3 | |
# Source: https://gist.github.com/jdstapleton/f7e252eb2a64ce0dd1a57eec075cee3b | |
# Installation: | |
# - copy this script somewhere on your machine, and set its executable bit | |
# - install `xdotool`, and `wmctrl` using your favorite package manager | |
# - Go to the Keyboard Shortcuts control panel | |
# - Scroll to the bottom to the 'Custom Shortcuts' section, click the `+` button | |
# - `Name` to be 'Terminal' or something similar | |
# - `Command` to be the path to the script where you copied it to. |
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
# Mac OSX: | |
listening () { | |
lsof -Pni | grep '(LISTEN)' | awk 'BEGIN {printf "%-15s %5s %21s\n", "Command", "PID", "PORT"} {printf "%-15s %5s %21s\n", $1,$2,$9}' | |
} | |
# Linux (if you want non-you processes that are listening): | |
listening () { | |
sudo lsof -Pni | grep '(LISTEN)' | awk 'BEGIN {printf "%-15s %5s %21s\n", "Command", "PID", "PORT"} {printf "%-15s %5s %21s\n", $1,$2,$9}' | |
} |
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
Vagrant.configure("2") do |config| | |
config.vm.synced_folder "~/.m2", "/home/vagrant/.m2" | |
if Vagrant.has_plugin?("vagrant-cachier") | |
# Configure cached packages to be shared between instances of the same base box. | |
# More info on the "Usage" link above | |
config.cache.scope = :box | |
config.cache.enable :generic, { | |
"www" => { cache_dir: "/var/cache/www" }, | |
} |
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
require 'rubygems' | |
require 'right_aws' | |
aws_access_key_id = 'your-access-key' | |
aws_secret_access_key = 'your-secret-key' | |
target_bucket = 'your-source-bucket' | |
destination_bucket = 'your-destination-bucket' | |
s3 = RightAws::S3Interface.new(aws_access_key_id, aws_secret_access_key) |