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/perl | |
#use Date::Parse; | |
use Time::ParseDate; | |
my $line_num = 0; | |
my $first_line = 0; | |
my $oldest_record = 0; | |
my $line = ''; | |
my $date = 0; |
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
[PS] C:\Windows\system32>get-mailbox -filter { usedatabasequotadefaults -eq $false -AND recipientTypeDetails -eq 'usermailbox' } | set-mailbox -UseDatabaseQuotaDefaults $true |
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
{ | |
"_id" : ObjectId("4defd2713fce2e9bc35d09f0"), | |
"author" : "Bob", | |
"date" : ISODate("2011-06-08T19:49:48.809Z"), | |
"body" : "Is it hot in here?", | |
"votes" : 0, | |
"answers" : [ | |
{ | |
"author" : "evan", | |
"date" : ISODate("2011-06-08T19:48:54.388Z"), |
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
#!/bin/bash | |
PS1='[\d \t \u@\h \# \W]\$ ' | |
function settitle () { | |
export PREV_COMMAND=${@} | |
export CURR_CMD=${PREV_COMMAND} | |
echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~} : ${CURR_CMD}\007" | |
} |
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/perl | |
use strict; | |
use warnings; | |
my @legal_headers = qw( Accept-Language Bcc Cc Comments Content-Type Content-Transfer-Encoding Content-ID Content-Description Content-Disposition Content-Language Date DKIM-Signature DomainKey-Signature From In-Reply-To Keywords List-Archive List-Help List-Id List-Owner List-Post List-Subscribe List-Unsubscribe Message-Id MIME-Version Received References Reply-To Return-Path Sender Subject Thread-Index Thread-Topic To User-Agent ); | |
my %legal_headers; | |
@legal_headers{@legal_headers} = (1) x @legal_headers; |
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
#!/bin/bash | |
# Compellent CLI config | |
WAL_ARCHIVE_DIR=/mnt/isilon/wal-archive/ | |
TIMESTAMP_FILE="$WAL_ARCHIVE_DIR/`date +%s`.lock" | |
JAVA=/usr/bin/java | |
CML_JAR=CompCU.jar |
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
# Read message body from STDIN, replacing illegal headers with X-headers. | |
my @legal_headers = qw( Accept-Language Bcc Cc Comments Content-Type Content-Transfer-Encoding Content-ID Content-Description Content-Disposition Content-Language Date DKIM-Signature DomainKey-Signature From In-Reply-To Keywords List-Archive List-Help List-Id List-Owner List-Post List-Subscribe List-Unsubscribe Message-Id MIME-Version Received References Reply-To Return-Path Sender Subject Thread-Index Thread-Topic To User-Agent ); | |
my %legal_headers; | |
@legal_headers{@legal_headers} = (1) x @legal_headers; | |
sub read_message { | |
my $in_header = 1; | |
my $in_body = 0; |
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/perl | |
my %domains = (); | |
while(<>) { | |
chomp; | |
my @a = split(/\t/); | |
my ($host, $dom, $points_to,$unused,$crap) = map { s/^([\W\s]+)(.+)/$2/g ; $_; } @a; | |
#next if $unused; |
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/perl | |
# | |
# Evan Hoffman ([email protected]) | |
# 13 January, 2010 | |
# | |
# Base functionality from: http://search.cpan.org/~gbarr/perl-ldap/lib/Net/LDAP/FAQ.pod#..._in_MS_Active_Directory_? | |
print "Content-Type: text/html\n\n"; | |
use Net::LDAP; |
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/perl | |
use DateTime; | |
my $date = '2009-02-13 15:43:14'; | |
print "Original: $date\n"; | |
print "Converted: "; | |
OlderNewer