Skip to content

Instantly share code, notes, and snippets.

View trlinkin's full-sized avatar

Thomas Linkin trlinkin

View GitHub Profile
@trlinkin
trlinkin / gist:4238948
Created December 8, 2012 06:43
tmux mouse toggle
# Toggle mouse on with ^B m
bind m \
set -g mode-mouse on \;\
set -g mouse-resize-pane on \;\
set -g mouse-select-pane on \;\
set -g mouse-select-window on \;\
display 'Mouse: ON'
# Toggle mouse off with ^B M
bind M \
@trlinkin
trlinkin / gist:5095173
Last active December 14, 2015 13:39
Install exe package with puppet
windows_package { 'Microsoft .NET Framework 4 Client Profile':
ensure => installed,
source => 'C:/dotNetFx40_Full_x86_x64.exe',
install_options => ['/q', '/norestart'],
}
@trlinkin
trlinkin / windows package sample
Created March 10, 2013 19:00
Methods of specifying windows install package. Eiter 1) specific package name, or 2) package id. Do this as either a namevar, or the title (assuming you won't use the namevar).
#package { '{45E908F3-EBB6-4214-9799-FB429B3213CA}':
package { 'SNK':
name => 'SNK',
#name => '{45E908F3-EBB6-4214-9799-FB429B3213CA}',
ensure => installed,
source => 'C:\modules\files\SNK.msi',
provider => 'msi',
}
@trlinkin
trlinkin / gist:5143512
Created March 12, 2013 14:49
Sample :puppet_enterprise_bootstrap Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# vagrant-pe_build settings
config.pe_build.download_root = 'https://s3.amazonaws.com/pe-builds/released'
config.pe_build.version = '2.7.1'
config.pe_build.suffix = 'ubuntu-12.04-amd64'
config.pe_build.filename = 'puppet-enterprise-2.7.1-ubuntu-12.04-amd64.tar.gz'
@trlinkin
trlinkin / gist:5484143
Created April 29, 2013 19:39
vhost logging
# Define log file names
if ! $access_log_file and ! $access_log_pipe {
if $ssl {
@trlinkin
trlinkin / gist:5484668
Created April 29, 2013 20:50
other logging conditionals
# Define log file names
if $access_log_file {
$access_log_destination = "${logroot}/${access_log_file}"
@trlinkin
trlinkin / hate.xml
Last active December 17, 2015 02:08
Dumb XML for great demonstration making of the xml mapper-scape.
<root>
<foo> I'm static and part of the type controlling a </foo>
<bar>
<baz>
<name> example ONE </name>
<comment> i'm a baz type that exists in /root/bar </comment>
</baz>
<baz>
<name> example TWO </name>
<comment> i'm a baz type that exists in /root/bar </comment>
@trlinkin
trlinkin / app-coherence.pp
Last active December 17, 2015 02:09
Sample Coherence cache configuration using XML Mapper
file { 'app-cache-config':
ensure => file,
path => '/tmp/coh-example.xml',
owner => 'nobody',
group => 'nobody',
mode => '0777',
}
cohcacheconfig { 'application-cache-config':
ensure => present,
@trlinkin
trlinkin / vagrant-box-updater.rb
Last active December 18, 2015 19:49
Simple base box updater for Vagrant base-boxes. Go from a pre 1.1 Virtualbox base-box to one ready for Vagrant 1.1+
#!/usr/bin/env ruby
require 'etc'
require 'FileUtils'
box_dir = "#{Etc.getpwuid.dir}/.vagrant.d/boxes"
printf "Attempting to upgrade your baseboxes in #{box_dir}\n"
Dir.entries(box_dir).each do |box|
next if ['.','..'].include? box
@trlinkin
trlinkin / gist:5951571
Created July 8, 2013 19:08
"late-esque" binding for PEBuild filename option default...
def filename
if @filename == UNSET_VALUE
return "puppet-enterprise-#{version}-#{suffix}.tar.gz"
end
@filename
end