This file contains 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
server { | |
listen *:80; | |
server_name kibana.domain.com; | |
access_log /var/log/nginx/kibana_access.log; | |
error_log /var/log/nginx/kibana_error.log; | |
location / { | |
root /var/www; | |
index index.html; |
This file contains 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
# Says something comforting | |
function comfort() { | |
messages[0]="I hear you." | |
messages[1]="I'm sorry. That's a bummer." | |
messages[2]="That blows." | |
messages[3]="Ouch. Okay, let's take a deep breath together." | |
messages[4]="Damn. Sounds like you're having a rough day." | |
messages[5]="Hey, we'll get through this together." | |
messages[6]="Aw man." | |
ind=$[$RANDOM % ${#messages[@]}] |
This file contains 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
source 'https://rubygems.org' | |
gem 'fog' | |
gem 'fog-vsphere' | |
gem 'awesome_print' |
This file contains 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
require 'puppet' | |
Facter.add('puppet_ssldir') do | |
setcode do | |
Puppet.settings['ssldir'] | |
end | |
end |
This file contains 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
source 'https://rubygems.org' | |
gem 'fog' | |
gem 'fog-vsphere' | |
gem 'awesome_print' | |
gem 'pry' |
This file contains 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
facter --json | |
{ | |
"uptime_seconds": 14927393, | |
"architecture": "x86_64", | |
"virtual": "physical", | |
"is_virtual": false, | |
"augeasversion": "1.4.0", | |
"kernel": "Linux", | |
"is_rootserver": "true", | |
"blockdevice_sda_size": 4000787030016, |
This file contains 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/env ruby | |
require 'ipaddr' | |
family = Socket::AF_INET | |
subnet_range = IPAddr.new("8.0.0.0/8", family).to_range | |
from = subnet_range.first(2).last | |
to = IPAddr.new(subnet_range.last.to_i - 2, family) |
This file contains 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
import time | |
import fcntl, struct | |
lockfile = open('/media/test/lockfile', 'w') | |
lockdata = struct.pack('hhllhh', fcntl.F_WRLCK, 0, 0, 0, 0, 0) | |
while 1: | |
try: | |
fcntl.fcntl(lockfile.fileno(), fcntl.F_SETLK, lockdata) | |
print "I have the lock." | |
time.sleep(1) |
This file contains 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
From 7d31b83218e0abad7fdaf4534c8b0629dbc944a3 Mon Sep 17 00:00:00 2001 | |
From: Timo Goebel <mail@timogoebel.name> | |
Date: Mon, 6 Nov 2017 11:08:28 +0100 | |
Subject: [PATCH] convert: skip foreman tasks tables | |
--- | |
lib/tasks/convert.rake | 2 ++ | |
1 file changed, 2 insertions(+) | |
diff --git a/lib/tasks/convert.rake b/lib/tasks/convert.rake |
This file contains 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
# lib/foreman_solarwinds/engine.rb | |
config.autoload_paths += Dir["#{config.root}/app/services"] | |
config.autoload_paths += Dir["#{config.root}/app/services/concerns"] | |
config.to_prepare do | |
begin | |
::IPAM.send(:include, ForemanSolarwinds::IpamExtensions) | |
rescue StandardError => e | |
Rails.logger.warn "ForemanSolarwinds: skipping engine hook (#{e})" | |
end |
OlderNewer