Skip to content

Instantly share code, notes, and snippets.

View petems's full-sized avatar
🏠
Working from home

Peter Souter petems

🏠
Working from home
View GitHub Profile
Divinity Banner
You are not logged in. [Log In] Larian Studios » Forums » Divinity - Original Sin » Divinity - Original Sin - Enhanced Edition » Enhanced Edition Changelist Register User Forum List Calendar Active Topics FAQ
Topic Options
#572102 - Yesterday at 02:43 PM Enhanced Edition Changelist
ForkTong Offline
Registered: 12/21/03
Posts: 814
@petems
petems / Without Java
Last active September 25, 2015 11:24
Java command on OSX with and without installation
vagrant:~ vagrant$ java
No Java runtime present, requesting install.
vagrant:~ vagrant$ /usr/libexec/java_home --failfast
Unable to find any JVMs matching version "(null)".
vagrant:~ vagrant$
@petems
petems / default.yml
Created March 18, 2015 08:57
Beaker Puppet Enterprise Testing
HOSTS:
ubuntu-12042-x64:
roles:
- master
- database
- dashboard
platform: ubuntu-12.04-amd64
box: ubuntu-server-12042-x64-vbox4210-nocm
box_url: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box
hypervisor: vagrant
@petems
petems / ruby.rb
Created March 16, 2015 11:18
Braindump of potential swap_file provider
def get_swap_files(file_path)
begin
output = swapon(['-s'])
rescue Puppet::ExecutionFailure => e
Puppet.debug("#get_swap_files had an error -> #{e.inspect}")
return nil
end
swapfiles = output.split("\n").sort
swapfiles.include?(file_path)
end
#!/bin/bash
sudo /usr/sbin/groupadd vagrant
sudo /usr/sbin/useradd vagrant -g vagrant -G wheel
echo "vagrant" | sudo passwd --stdin vagrant
echo "vagrant ALL=(ALL) NOPASSWD: ALL" |sudo tee /etc/sudoers.d/vagrant 1>/dev/null
sudo chmod 0440 /etc/sudoers.d/vagrant
sudo mkdir -m 700 /home/vagrant/.ssh
sudo touch /home/vagrant/.ssh/authorized_keys
echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key" | sudo tee /home/vagrant/.ssh/authorized_keys 1>/dev/null
sudo chmod 600 /home/vagrant/.ssh/authorized_keys
@petems
petems / gist:95e28454b0347adbb2c1
Created February 12, 2015 15:26
Uninstall Winrar
package { 'WinRAR 5.21 beta 2 (64-bit)':
ensure => absent,
uninstall_options => ['/S'],
}
@petems
petems / boostrap.ps1
Created February 11, 2015 15:10
AWS Windows Bootstrap
Set-ExecutionPolicy Unrestricted -Force
function Start-ProcessAsAdmin(
[string] $FilePath,
[string] $Arguments)
{
if ($FilePath -match ".*powershell")
{
$Arguments = "-NoProfile -ExecutionPolicy Unrestricted -Command `"$Arguments`""
}
@petems
petems / interval_fix.ps1
Last active August 29, 2015 14:15
Change Puppet Enterprise Interval Checkin on Windows to 30s
function Start-ProcessAsAdmin(
[string] $FilePath,
[string] $Arguments)
{
if ($FilePath -match ".*powershell")
{
$Arguments = "-NoProfile -ExecutionPolicy Unrestricted -Command `"$Arguments`""
}
$process = New-Object System.Diagnostics.Process
@petems
petems / Vagrantfile
Created February 4, 2015 14:04
Windows Beaker Vagrantfile
Vagrant.configure("2") do |c|
c.vm.define 'win-2008R2-std' do |v|
v.vm.hostname = 'win-2008R2-std'
v.vm.box = 'opentable/win-2008r2-standard-amd64-nocm'
v.vm.box_check_update = 'true'
v.vm.network :private_network, ip: "10.255.174.15", :netmask => "255.255.0.0", :mac => "080027E855B5"
v.vm.network :forwarded_port, guest: 3389, host: 3389
v.vm.network :forwarded_port, guest: 5985, host: 5985, id: 'winrm', auto_correct: true
v.vm.guest = :windows
v.vm.provider :virtualbox do |vb|
@petems
petems / Beaker.log
Created February 3, 2015 09:46
Full FreeBSD Log
BEAKER_debug=true bundle exec rspec spec/acceptance/ini_setting_spec.rb
/opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/beaker-rspec-5.0.1/lib/beaker-rspec/helpers/serverspec.rb:43: warning: already initialized constant Module::VALID_OPTIONS_KEYS
/opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/specinfra-2.12.3/lib/specinfra/configuration.rb:4: warning: previous definition of VALID_OPTIONS_KEYS was here
Hypervisor for freebsd-9-x64 is vagrant
Beaker::Hypervisor, found some vagrant boxes to create
==> freebsd-9-x64: VM not created. Moving on...
created Vagrantfile for VagrantHost freebsd-9-x64
Bringing machine 'freebsd-9-x64' up with 'virtualbox' provider...
==> freebsd-9-x64: Importing base box 'freebsd-9-x64-vbox'...
==> freebsd-9-x64: Matching MAC address for NAT networking...