Skip to content

Instantly share code, notes, and snippets.

View mcphersoncreative's full-sized avatar

Bart McPherson mcphersoncreative

  • McPherson Creative LLC
  • Cleveland, OH
View GitHub Profile
input {
## WebLogic Server Log
file {
type => "weblogic"
path => [ "/var/log/weblogic/domain/managedserver.log" ]
codec => multiline {
pattern => "^####"
negate => true
what => previous
}
@mcphersoncreative
mcphersoncreative / csuvarn
Created November 14, 2013 16:20
Varnish example for Drupal 7. Taken/combined from many different sources.
# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# Define the internal network subnet.
# These are used below to allow internal access to certain files while not
# allowing access from the public internet.
acl internal {
"123.456.789.0"/24;
}
@mcphersoncreative
mcphersoncreative / webqueryextract.pl
Created May 31, 2012 13:57
Perl script for extracting specific "copy" div from html files that will be imported into Drupal using Feeds module. Call from command line by passing in list of files. ex: find dir/to/start/looking/ -name "*html" -exec /script/location/webqueryextract.p
#!/usr/bin/env perl
use strict;
use warnings;
use HTML::TreeBuilder;
use Web::Query;
#location to write output
my $unique_filename = '/usr/local/etc/httpd/extracted_divs/' . get_timestamp();
my $guid_counter = 0;
#field separator