×

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home4/ccollins/public_html/ccollins/includes/common.inc).

Log4perl

I have been looking a long time for something to set the logging level in log4perl. I finally found a setting for it. It is the "Threshold" setting.
So you can set the screen to INFO but the log to TRACE. That way you don't get all the just printed to the screen but you can reference back to it.
This is really good for debugging purposes

For example :

How to add a scheduled task .bat file without running cmd.exe

So i had to restart IIS every day at 11 pm . I did not want to run the .bat file in a command prompt so i went looking ....
Put the iisrestart.vbs file into a scheduled job .

Details

C:\scripts\iisrestart.bat

\@echo off
REM - File: iisrestart.bat

echo Restarting IIS...
echo ======================================================

net stop W3SVC
net start W3SVC

echo ======================================================
echo IIS Restarted

C:\scripts\iisrestart.vbs

my .perltidyrc

https://github.com/chriscollins969/perltidy-settings/

 

### PERL BEST PRACTICES

 
### We start off with these which equate to the following

 
### -l=78 -i=4 -ci=4 -st -se -vt=2 -cti=0 -pt=1

 
### -bt=1 -sbt=1 -bbt=1 -nsfs -nol

 
### -wbb="% + - * / x != == >= <= = ~ ! ~ < > | & = **=

 
### += *= &= <<= &&= -= /=### |= >>= ||= //= .= %= ˆ= x="

Perl program to write a .xlsx file

So I made this return file for a client and the sales person got their panties up in their ass because they wanted it as a .xlsx formated to each store. So i wrote this to make life easier for myself.


return.csv

STORE,ITEM,BUNDLE,BEG_CARD,END_CARD,TRACKING,ORDER,QTY
T0684,17312001010,10006650,6001760806021262250,6001760806021262490,590698842944,470712,12



env.in

# EMAIL for the program
emailSENDER = jetitmanager@
emailRECIPIENTS = christopherc@

Log comments into database through web app

I got a bug up my ass to log everything i did into a database. I wrote this very handy perl cgi program the gets the last few rows and add another .

Uses a MySql database

The DATABASE

-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 03, 2014 at 07:04 PM
-- Server version: 5.6.20
-- PHP Version: 5.5.15

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";