Skip to content

Instantly share code, notes, and snippets.

View supercow's full-sized avatar

James Sweeny supercow

View GitHub Profile

Keybase proof

I hereby claim:

  • I am supercow on github.
  • I am sweeny (https://keybase.io/sweeny) on keybase.
  • I have a public key ASA8ZI5iG5OrJ4-2sydxh_e2qTua6AjPrYE-pzYvOezJMAo

To claim this, I am signing this object:

@supercow
supercow / view_all_activites.sql
Created April 6, 2017 17:07
View all PE activity service events without the GUI
select
ec.submit_time,
s.subject_name,
o.object_name,
e.message
from event_commits ec
left join events e on ec.id = e.commit_id
left join subject_digests s on s.id = ec.subject_digest_id
left join object_digests o on ec.object_digest_id = o.id
order by ec.submit_time desc limit 10;
class fail {
exec { 'fail':
command => '/bin/false',
}
}
include fail
$hash = { 'a' => { 'message' => 'a'} }

"We need a technical person give the presentation" -> "We need a SME on the topic to give the presentation"

"A technical person needs to review the project plan" -> "One of the delivery engineers needs to review the project plan"

"This document looks good, but could we get someone technical to review?" -> "This document looks good, but could we get someone who's encountered the issue to review?"

"People who come up to the booth love talking to the technical staff." -> "People who come up to the booth love talking to the subject matter experts"

__git_ps1_unfucker() {
unalias -a
__git_ps1 "$@"
}
# ... SNIP ...
PS1_git='\[\033[01;37m\]$(__git_ps1_unfucker " (%s)")'
PS1="${PS1_user}${PS1_at}${PS1_host}${PS1_colon}${PS1_pwd}${PS1_git}${PS1_shell}"
if ! $::package_installed {
file { 'download_rpm':
ensure => file,
path => '/tmp/my_package.rpm',
source => 'puppet:///files/my_package.rpm',
}
exec { 'install_package':
command => '/bin/rpm -i /tmp/my_package.rpm',
require => File['download_rpm'],
}
#!/bin/bash
curl -k -X DELETE -H "Accept: pson" https://master:8140/production/certificate_status/certname_to_rm
$req = [System.Net.WebRequest]::Create('https://master:8140/production/certificate_status/certname_to_rm')
$req.Method = "DELETE"
$req.Accept = "pson"
$req.ContentLength = 0
# ignore ssl checks
$ssl_check = [System.Net.ServicePointManager]::ServerCertificateValidationCallback
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
$req.GetResponse()
if File.exists?('/tmp/test')
Facter.add('test_content') do
setcode do
File.read('/tmp/test')
end
end
end
@supercow
supercow / output
Last active December 26, 2015 06:09
supercow@stout:~$ puppet apply /tmp/test.pp
Notice: Compiled catalog for stout.4c in environment production in 0.05 seconds
Notice: /Stage[main]//Ssh_authorized_key[supercow@doppelbock]/ensure: current_value absent, should be present (noop)
Notice: /Stage[main]//Ssh_authorized_key[supercow@Kriek]/ensure: current_value absent, should be present (noop)
Notice: /Stage[main]//Ssh_authorized_key[supercow@stout]/ensure: current_value absent, should be present (noop)
Notice: Class[Main]: Would have triggered 'refresh' from 3 events
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
Notice: Finished catalog run in 0.03 seconds