Skip to content

Instantly share code, notes, and snippets.

View jtopper's full-sized avatar

Jon Topper jtopper

View GitHub Profile
@jtopper
jtopper / gist:2711679
Created May 16, 2012 16:06
lolcurrying
class sf_apache::params {
$fw_name_service = '0080 apache service'
}
class sf_apache::config ( $httpd_config ) {
include sf_apache::params
@firewall { $sf_apache::params::fw_name_service:
@jtopper
jtopper / gist:2712295
Created May 16, 2012 17:12
Should this be legal?
define sf_apache::firewall_allow::service ( $source ) {
firewall { "080 ${title}":
require => Class["sf_apache::config"],
proto => 'tcp',
dport => $sf_apache::config::httpd_config['Port'],
source => $source
}
}
@jtopper
jtopper / gist:8588263
Last active August 24, 2024 07:28
Add a new disk to a VMWare vagrant box
config.vm.provider :vmware_fusion do |vm|
vdiskmanager = '/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager'
dir = "#{ENV['HOME']}/vagrant-additional-disk"
unless File.directory?( dir )
Dir.mkdir dir
end
@jtopper
jtopper / gist:8667226
Last active January 4, 2016 19:29
Autocomplete known ssh hosts and filenames when using ssh or scp
# Add this to .profile or .bashrc
_complete_ssh() {
local cur=${COMP_WORDS[COMP_CWORD]}
local hosts=$(awk -F'[ ,]' '{ print $1 }' ~/.ssh/known_hosts | sort -u)
COMPREPLY=( $(compgen -W "${hosts}" -- ${cur}) )
}
complete -o default -F _complete_ssh ssh scp

Keybase proof

I hereby claim:

  • I am jtopper on github.
  • I am jtopper (https://keybase.io/jtopper) on keybase.
  • I have a public key whose fingerprint is C185 4653 CFD9 D11F 6FA9 8733 C4F9 2C8E C8C7 ECFE

To claim this, I am signing this object: