Skip to content

Instantly share code, notes, and snippets.

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

Robert Bohne rbo

🏠
Working from home
View GitHub Profile
#!/bin/sh
machine=`uname -m`
if [ "$machine" == "x86_64" ]; then
PERL="/wwws/perl/perl-5.10.0-oc10/bin/perl"
export LD_LIBRARY_PATH=/lfs/oracle/ora10203c/lib32
export ORACLE_HOME=/lfs/oracle/ora10203c
else
PERL="/wwws/perl/bin/perl"
export LD_LIBRARY_PATH=/lfs/oracle/ora9206/lib
sub get_proxy_credentials {
my $self = shift;
my ($user, $password);
if ( defined $CPAN::Config->{proxy_user} &&
defined $CPAN::Config->{proxy_pass}) {
$user = $CPAN::Config->{proxy_user};
$password = $CPAN::Config->{proxy_pass};
return ($user, $password);
}
my $username_prompt = "\nProxy authentication needed!
#!/usr/bin/env perl
# Script from getty:
# http://www.raudssus.de/blog/dbix-class-autoupgrade
use MyApp::Schema;
use SQL::Translator::Diff;
use SQL::Translator;
{
> [08:29:24]:22253 $ prove -Ilib -v xt/00-critic.t
xt/00-critic.t ..
1..14
not ok 1 - Test::Perl::Critic for "/Volumes/Users/rbo/Development/Perl/Contribute/gearman-driver/xt/../lib/Gearman/Driver.pm"
# Failed test 'Test::Perl::Critic for "/Volumes/Users/rbo/Development/Perl/Contribute/gearman-driver/xt/../lib/Gearman/Driver.pm"'
# at /Users/rbo/Perl/perls/perl-5.12.0/lib/site_perl/5.12.0/Test/Perl/Critic.pm line 110.
#
# Perl::Critic found these violations in "/Volumes/Users/rbo/Development/Perl/Contribute/gearman-driver/xt/../lib/Gearman/Driver.pm":
# Private Member Data shouldn't be accessed directly at line 729, column 5. Accessing an objects data directly breaks encapsulation and should be avoided. Example: $object->{ some_key }. (Severity: 5)
@rbo
rbo / gist:835031
Created February 19, 2011 12:03
Make foo::bar to a valid sub name...
diff Perl.tmLanguage Perl.tmLanguage.orignal
970c970
< <string>^\s*(sub)\s+([-a-zA-Z0-9_:]+)\s*(\([\$\@\*;]*\))?</string>
---
> <string>^\s*(sub)\s+([-a-zA-Z0-9_]+)\s*(\([\$\@\*;]*\))?</string>
@rbo
rbo / gist:863707
Created March 10, 2011 07:33
Part of DBIx::Class::Storage::DBI->insert()
# list of primary keys we try to fetch from the database
# both not-exsists and scalarrefs are considered
my %fetch_pks;
for ($source->primary_columns) {
$fetch_pks{$_} = scalar keys %fetch_pks # so we can preserve order for prettyness
if ! exists $to_insert->{$_} or ref $to_insert->{$_} eq 'SCALAR';
}
my ($sqla_opts, @ir_container);
if ($self->_use_insert_returning) {
$ ansible-playbook -i hosts.osp06 openshift-ansible/playbooks/byo/config.yml
....
TASK [Evaluate oo_first_master] ************************************************
changed: [localhost]

TASK [Evaluate oo_lb_to_config] ************************************************
changed: [localhost] => (item=utility)

TASK [Evaluate oo_nfs_to_config] ***********************************************
@rbo
rbo / naglux.md
Created February 1, 2017 10:03
NAGFLUX:TAG / NAGFLUX:FIELD
+++ b/etc/nagflux/nagios_nagflux.cfg
-service_perfdata_file_template=.....$SERVICESTATETYPE$
+service_perfdata_file_template=.....$SERVICESTATETYPE$\tNAGFLUX:TAG::$_SERVICENAGFLUX_TAG$


+++ b/etc/nagios/conf.d/XXXX/services.cfg
@@ -65,6 +65,8 @@ define service {
..........
+ _NAGFLUX_TAG influxdb_source=Internal
@rbo
rbo / initContainers.yaml
Created November 15, 2018 15:39
initContainers - check tcp port
initContainers:
- name: check-eventserver
image: rhel7/rhel-tools
command: ['sh', '-c', 'while true ; do echo "Try to connect... " ; nc -z $SERVICENAME$ $PORT$ && break; sleep 5; done; echo "Eventserver is running..."']
@rbo
rbo / chrony.conf
Created December 9, 2018 17:51
cat /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.rhel.pool.ntp.org iburst
server 1.rhel.pool.ntp.org iburst
server 2.rhel.pool.ntp.org iburst
server 3.rhel.pool.ntp.org iburst
# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift