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/env python | |
import os | |
import os.path | |
import time | |
import shutil | |
import glob | |
import email | |
def get_maildirs(): |
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
require 'facter' | |
# Function to figure out old school to new school mappings | |
# Uses the biosdevname info to generate a mapping | |
module Puppet::Parser::Functions | |
newfunction(:c7_int_name, :type => :rvalue) do |args| | |
if args.length != 1 | |
raise(Puppet::ParseError, "No interface name passed to convert") | |
end | |
int_name = args[0] |
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
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/events | |
java.sql.DriverManager.getConnection(java/sql/DriverManager.java:596) | |
java.sql.DriverManager.getConnection(java/sql/DriverManager.java:215) | |
java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:606) | |
RUBY.connect(/home/damian/Projects/tj/logstash/build/tarball/logstash-1.4.1-modified/lib/logstash/outputs/mysql.rb:101) | |
RUBY.flush(/home/damian/Projects/tj/logstash/build/tarball/logstash-1.4.1-modified/lib/logstash/outputs/mysql.rb:56) | |
RUBY.buffer_flush(/home/damian/Projects/tj/logstash/build/tarball/logstash-1.4.1-modified/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:219) | |
org.jruby.RubyHash.each(org/jruby/RubyHash.java:1339) | |
RUBY.buffer_flush(/home/damian/Projects/tj/logstash/build/tarball/logstash-1.4.1-modified/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/buffer.rb:216) |
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
$ env | grep proxy | |
http_proxy=http://proxy:3128/ | |
rsync_proxy=http://proxy:3128/ | |
https_proxy=http://proxy:3128/ | |
sftp_proxy=http://proxy:3128/ |
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
irb(main):001:0> hostname = 'puppet-03' | |
=> "puppet-03" | |
irb(main):002:0> hostname.split('-', 0) | |
=> ["puppet", "03"] | |
irb(main):003:0> hostname.split('-', 1) | |
=> ["puppet-03"] | |
irb(main):004:0> hostname.split('-', 2) | |
=> ["puppet", "03"] |
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
# This is a horrible thing | |
# Kinda (mostly) figures out the server type from the hostname | |
Facter.add("servertype") do | |
setcode do | |
hostname = Facter.value('hostname') | |
if hostname.include?('-') | |
hostname_parts = hostname.split("-", 0) | |
hostname_parts[0].downcase | |
elsif hostname =~ /^ns/ |
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
[Tue May 06 12:10:29] [root@puppet-03 facter]$cat /etc/puppet/environments/production/hiera/hiera.yaml | |
--- | |
:backends: yaml | |
:yaml: | |
:datadir: "/etc/puppet/environments/%{::environment}/hiera" | |
:hierarchy: | |
- "node/%{::fqdn}" # ws-27.lhr4.**************** | |
- "type/%{::servertype}" # TI | |
- "silo/%{::silo}" # lhr_xml_05 | |
- "project/something" # project specific stuff |
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
Url: http://www.carbonhire.com/[email protected] | |
PHP warning | |
mysql_connect(): Access denied for user 'geniushire'@'10.147.146.186' (using password: YES) | |
/var/app/current/track.php(12) | |
01 <?php 02 03 define('CRONJOB', TRUE); 04 include("index.php"); 05 06 $email = isset($_GET['email']) ? $_GET['email'] : ""; 07 $hash = md5("carbon".$email); 08 setcookie("guid", $hash, time() + (10 * 365 * 24 * 60 * 60), "/", "carbonhire.com"); 09 //print_r($_COOKIE); 10 header("Location: http://hastrk1.com/serve?action=click&publisher_id=59998&site_id=47256&offer_id=274954", true, 302); 11 12 $link = mysql_connect('geniushire-real-1.cbuqrrbjabbr.us-east-1.rds.amazonaws.com', 'geniushire', ';kcvGayqe05t4!?'); 13 if (!$link) { 14 die('Could not connect: ' . mysql_error()); 15 } 16 17 mysql_select_db("geniushire_real_new", $link) or die('Could not select database.');$sql = "UPDATE gh_central SET cookie_id = '".$hash."' WHERE email = '".$email."'"; 18 if($email != ""){ 19 $sql = "UPDATE gh_central SET |
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
/* This file lives @ ~/.js/youtube.com.js | |
* Requires: https://github.com/defunkt/dotjs | |
*/ | |
/* Make it not stick the header to the top of the window */ | |
$('#masthead-positioner').css('position', 'static'); |
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
Set check_external_commands=1 in /etc/icinga/icinga.cfg | |
apt-get install snmpd snmptt | |
cat > /etc/init.d/snmptrapd <<'EOF' | |
#! /bin/sh -e | |
### BEGIN INIT INFO | |
# Provides: snmptrapd | |
# Required-Start: $network $remote_fs $syslog | |
# Required-Stop: $network $remote_fs $syslog |