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 | |
# child process to background | |
# poll windows services and re-enable + start them | |
use Win32::Service; | |
use Win32::OLE; | |
use strict; | |
# set logfile location | |
my $logfile = 'log.txt'; |
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 -w | |
use Term::ReadKey; | |
# make STDOUT hot | |
$| = 1; | |
$string = ''; | |
$done = 0; | |
# get your dir listing | |
opendir($dh, '.'); |
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
# useful to implement in many scripts that need to verify user input from CLI or config files | |
use constant REGEX_TRUE => qr/^\s*(?:true|(?:t)|(?:y)|yes|(?:1))\s*$/i; |
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
name | version | files | size | area | |
---|---|---|---|---|---|
ANSIColor | 3.00 | 0 | 0 | perl | |
ActivePerl-CPAN-Config | 1.0 | 2 | 1900 | perl | |
ActivePerl-Config | 1.3 | 2 | 17865 | perl | |
ActivePerl-DocTools | 2.4 | 13 | 63474 | perl | |
ActivePerl-IIS-Config | 1.0 | 0 | 0 | perl | |
ActivePerl-PPM | 4.14 | 64 | 622271 | perl | |
ActiveState-PerlCritic | 10.0 | 24 | 191887 | perl | |
ActiveState-RelocateTree | 1.4 | 4 | 29505 | perl | |
ActiveState-Scineplex | 1.1 | 7 | 86307 | perl |
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
#! perl -w | |
# read exported ppm csv list and install all missing modules | |
use strict; | |
# first make sure everything is up to date | |
print "updating all installed modules...\n"; | |
print `ppm upgrade --install`; | |
print "\ndone\n\n"; |
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
GO | |
CREATE FUNCTION RoundSigFig(@Number float, @Figures int) | |
RETURNS float | |
AS | |
BEGIN | |
DECLARE @Answer float; | |
SET @Answer = ( | |
SELECT |
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
select (CONVERT([int],@Date_,(0))+(2415021)) |
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
# mshock's Perltidy options | |
# Perl Best Practices | |
# an abbreviation for the parameters in the book Perl Best Practices by Damian Conway: | |
# -l=78 -i=4 -ci=4 -st -se -vt=2 -cti=0 -pt=1 -bt=1 -sbt=1 -bbt=1 -nsfs -nolq | |
# -wbb="% + - * / x != == >= <= =~ !~ < > | & = | |
# **= += *= &= <<= &&= -= /= |= >>= ||= //= .= %= ^= x=" | |
-pbp |
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
sub julianify { | |
my ( $year, $month, $day ) = @_; | |
my $a = int( ( 14 - $month ) / 12 ); | |
my $y = $year + 4800 - $a; | |
my $m = $month + 12 * $a - 3; | |
return | |
$day | |
+ int( ( 153 * $m + 2 ) / 5 ) | |
+ 365 * $y |
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
<img src=' | |
http://www.gravatar.com/avatar/ab623233b6a75fecb24a28b6cf2013b7.png | |
' | |
alt='cheshire_avatar'> |
OlderNewer