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
#!/bin/bash | |
mute() { | |
temp=$(mktemp) | |
pacmd list-sink-inputs > $temp | |
process_id=$(pidof "twinkle") | |
while read line; do | |
if [[ "${line:0:6}" == "index:" ]]; then | |
index="${line:7}" |
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
class srv-epflldap { | |
### Global attributes ########################## | |
### LVM partitions ############################# | |
class {'generic-tmpl::os::lvm': | |
volume_group => 'vg0', | |
physical_volumes => ['/dev/vda2'], | |
logical_volumes => { | |
'opt' => {'size' => '20G'}, |
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
class srv-epflldap { | |
### Global attributes ########################## | |
### LVM partitions ############################# | |
class {'generic-tmpl::os::lvm': | |
volume_group => 'vg0', | |
physical_volumes => ['/dev/vda2'], | |
logical_volumes => { | |
'opt' => {'size' => '20G'}, |
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/ruby | |
require 'mcollective' | |
include MCollective::RPC | |
mc = rpcclient('augeasquery') | |
mc.query(:query => '/files/etc/mtab/*[vfstype="nfs"]/spec').each do |resp| | |
resp[:data][:matched].each do |v| | |
puts "#{resp[:sender]} #{v[/=.(.*)/]}" |
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
# pin.pp | |
# pin a release in apt, useful for unstable repositories | |
define apt::pin( | |
$ensure = present, | |
$explanation = "${::caller_module_name}: ${name}", | |
$order = '', | |
$packages = '*', | |
$priority = 0, | |
$release = '', |
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
# crm_support: true/nil | |
# Whether there is Pacemaker installed | |
Facter.add('crm_support') do | |
confine :kernel => :linux | |
setcode do | |
crm_resource = Facter::Util::Resolution.exec('which crm_resource') | |
crm_resource.nil? ? nil : true | |
end | |
end |
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
# crm_support: true/nil | |
# Whether there is Pacemaker installed | |
Facter.add('crm_support') do | |
confine :kernel => :linux | |
setcode do | |
crm_resource = Facter::Util::Resolution.exec('which crm_resource') | |
crm_resource.nil? ? nil : true | |
end | |
end |
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
input { | |
stdin {} | |
} | |
filter { | |
grok { | |
pattern => "(?<gis.version>([0-9\.]{5}))\/(?<gis.layer>([a-z0-9\.-]*))\/default\/(?<gis.release>([0-9]{8}))\/(?<gis.reference-system>([0-9]*))\/(?<gis.zoomlevel>([ 0-9]*))\/(?<gis.row>([0-9]*))\/(?<gis.col>([0-9]*))\.(?<gis.filetype>([a-zA-Z]*))" | |
} | |
wmts { } |
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
#!/bin/bash | |
# A simple script to backup an organization's GitHub repositories. | |
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files | |
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up | |
# (if you're backing up a user's repos instead, this should be your GitHub username) | |
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API) | |
GHBU_PASSWD=${GHBU_PASSWD-"<CHANGE-ME>"} # the password for that account | |
GHBU_GITHOST=${GHBU_GITHOST-"github.com"} # the GitHub hostname (see comments) | |
GHBU_PRUNE_OLD=${GHBU_PRUNE_OLD-true} # when `true`, old backups will be deleted |
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
x27[00;37mHypervisor for debian-7-amd64 is vagrant | |
x27[00;00mx27[01;37mBeaker::Hypervisor, found some vagrant boxes to create | |
x27[00;00mx27[00;37mDetermined existing vagrant box debian-7-amd64 ip to be: 10.255.130.86 | |
x27[00;00mx27[00;37mconfigure vagrant boxes (set ssh-config, switch to root user, hack etc/hosts) | |
x27[00;00mx27[00;37mGive root a copy of current user's keys, on debian-7-amd64 | |
x27[00;00mx27[00;37m | |
debian-7-amd64 17:56:35$ sudo su -c "cp -r .ssh /root/." | |
x27[00;00mx27[00;37mCreated ssh connection to 10.255.130.86, user: vagrant, opts: {:config=>"/tmp/debian-7-amd6420141202-10584-yc1q5z", :user=>"vagrant"} | |
x27[00;00mx27[00;34mAllocated a PTY on 10.255.130.86 for " sudo su -c \"cp -r .ssh /root/.\" " | |
x27[00;00mx27[00;37m |
OlderNewer