Apr 30 2009

speaker wiring

Category: moodsadmin @ 1:52 pm

hooking up a new speakers for the PA system in an ellsworth department store. it’s fun. up and down ladders all day and playing with insulation. yay! there is a drop ceiling and i removed this one tile and holy shit so much DIRT came out of this ceiling 12 feet off the ground i almost shit myself in shock - which would have been impressive to do on the ladder….

it’s lunch time now and i’m more thna halfway done (but i do realize that i took my lunch more than halfway thorugh the day so it’s kinda skewed data).


Apr 29 2009

javascript form validation library

Category: documentation, helpful linksadmin @ 11:37 am

when it comes to form validation i get frustrated too quickly to sit there and reinvent the wheel every time. my solution has been made more simple than i would have asked: TMT Validation Library from www.massimocorner.com

so easy to install.

link to libs

add call into form

define types of validation on inputs.

i would reccomend this to a friend


Apr 27 2009

zoneminder on slack12.2 with ffmpeg and openjpeg

Category: documentationadmin @ 2:27 pm

install slack

get sources for zm (i’m using 1.24.1)

checkout ffmpeg from svn (they might have formal releases after this google summer of code project)

#svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg

get the libopenjpeg (oen jpeg 2000 libraries)

#tar zxvf /open/jpeg.tar.gz

#cd /newly/made/folder

#make

#make install

#make clean

now configure ffmpeg from that dir. i used this:

#./configure –enable-gpl –enable-shared –enable-nonfree –enable-avfilter –enable-libopenjpeg –enable-postproc

#make

#make install

( at this point running #ffmpeg should output sensible info without errors…an #ldconfig may be required)

now for zoneminder. from that source directory

#./configure –with-ffmpeg=/usr/local/ –with-webdir=/var/www/htdocs/ –with-mysql=/usr/ –with-libarch=lib –with-cgidir=/var/www/cgi-bin/ –with-webuser=apache –with-webgroup=apache –enable-debug=no –disable-crashtrace –disable-mmap

if your set up like me this is where you’ll find all of your missing perl modules. run the configure and it will through errors. use cpan to install them until configure stops erroring out. i always start by installing the most current cpan. in general i allow perl to autoresolve dependancies…mostly because it is such a headache to manually track them down

#cpan CPAN

#cpan YAML

#cpan Date::Manip

#cpan LWP::UserAgent

#cpan PHP::Serialization

at this point the configure statement told me i was good to go

#make

#make check

#make install

#make clean


Apr 24 2009

avs and cvn

Category: documentationadmin @ 6:33 pm

doesn’t make much sense to me that my credit card company fails both the avs and the cvv2 security checks and still authorizes the transaction….. capital one is the card company and the payment processor is virtual merchant. was building a portal and did some heavy testing here. apparently my virtual merchant doesn’t fail any cards based on avs, what good is it to have known after the fact that the address someone put in didn’t match the credit card company’s address on file. similar with cvn…a fail here should be a direct fail, not a soft one that still charges me. i guess they’d rather the charges be incurred and then disputed. great policy.


Apr 23 2009

soul position - share this

Category: hip-hop, inspiration & quotesadmin @ 3:17 pm

this song is being looped a lot by me lately. true talent.

Study this as you study your first born
My first song was pain personified in song
The longest sequence is looped for days long
Where bass kicks are fierce and snares are
Known to drop a lot quicker than a child’s tears
And drown out the drama that I didn’t want to share
The load I wouldn’t wish upon my enemies to bear
The times I used to tell myself you didn’t want to hear
Until the reason in my rhyme become clear
Now what I write makes the load a lot lighter
The story of my life epitomizes imperfection
As a musical where every scene seems to lack direction
And I stand center stage stunned by what’s happening
Blinded by the lights, cameras, action
Although I never asked for this lead role
It seems that God decided it a long time ago
I was chosen for this
Given the gift to gain and maintain the crowd’s cheers
I break bread over beats with like-minded peers
And share the story of my last trip into the atmosphere
On the ninth cloud, I indian style
Arms outstretched and Hell in God’s breath
I saw the stairway to heaven
And counted one-hundred and forty-four thousand steps
I wanted to climb but it wasn’t my turn yet
So I returned to earth just before the sun set
And I could stare, waiting for this golden opportunity to share

Now I share this with you
I’ll share this with you
With all of you
I’ll share this with you
I’ll share this with
Each and every
One of you

Now in my younger days that quickly passed
I fell asleep in history class
Not enchanted my past misery
I’d rather chase down the present with a glass of heinousy
And tilted my flower-like childhood wilted when my innocence was secluded
Plus the water we gave to it stayed polluted like the veins of cocaine users
My blood stream’s still a little murky from flash-backs of murder scenes
Medical emergencies that fell upon deaf ears
Over 8 million stories in a city that nobody wants to hear
But as bad as it appears, I am happy that I’m here

To share this with you
To share this with you
To share this with
All of you
To share this with you
Share this with you
Share this with
Each and every one of you

Heh, and share I will
I’ll share the nights where fist fights left somebody’s body lying still
The ice grills, the cold of wire(?) night’s chill
I’ll even share the blood spill
The memory of all my loved ones killed
The unpaid bills
The pain of a terminally ill
My ill will towards my rivals
My approach towards hip-hop survival
The circumstance that made some suicidal
The same circumstance that made others homicidal
The signs of the vital
The ways of the trial
The dope fiends that walk around my block in denial
The short life cycles
The minds that lie idle
My people that got out of court on a missed trial
My hunger to become more grounded in the Bible
Is smiled on behalf of my last day’s arrival


Apr 23 2009

cron into dsl embedded

Category: documentation, helpful linksadmin @ 10:37 am

alright starts with the premise that you have the most recent version of cron.dsl from the mydsl repository.

scp that to the destination machine:
# scp /home/ben/documents/wess/zmMonitors/cron30.dsl dsl@192.168.11.201:/home/dsl/

ssh to the destination machine and do the following
# sudo mydsl-load cron.dsl
# export VISUAL=vi
# sudo crontab -e
****at this point make your cron entries…helpful link lazy man’s cron generator by robert plank*****

verify the cronjob
# sudo crontab -l

in my particualr case i rebooted while i was there…been having memory issues (in the computer, not me)


Apr 22 2009

kde4.2 on windows

Category: winblozeadmin @ 11:58 pm

from the kde website

i hate it but i have a windows computer. i find the interface intolerable for the brief times i do have to use it, and was inspired to look for others who have already solved my issue at hand. well there is a very complete solution and i’m installing it as i type. i’ll post back with whether it ran ok on the junky xp box or not sometime when i remember.

edited 20090527

took it off because using it was horrible


Apr 22 2009

run a local slackware current

Category: documentation, helpful links, scriptsadmin @ 11:53 pm

this comes care of alien who has done so much for the slackware community. basically, you cron a script i believe he built, i opted to create and use a custom config file, and found it well documented and straightfoward, the script looks for changes in the CHANGELOG.txt and if it finds updates, downloads them and either generates 3 cdrom images, a dvd image, or both.

ethier way it’s a great script mirror-slackware-current.sh and my local slackware mirror can be found at http://drunkensailor.org/slackware/slackware-current/


Apr 21 2009

master ladder theory link

Category: helpful links, moodsadmin @ 11:10 am

i love this theory… it used to be housed by intellectualwhores.com and since has become very difficult to find (even though the domain is simple and self explanatory).

it’s the classic when harry met sally type of argument: women and men are pretty much incapable of being friends

read more at the real website: http://www.laddertheory.com or my mirror (in case it disappears) at http://www.benbernier.com/mirrors/laddertheory.com/


Apr 20 2009

jeep quote from dad

Category: inspiration & quotesadmin @ 1:19 am

i was talking with my dad this evening and he mentioned this:

“a good running jeep is better than a good looking one”


Apr 19 2009

rename mp3s from id3s

Category: documentation, scriptsadmin @ 1:00 pm

#!/usr/bin/perl
require 5;
use strict;
use Image::ExifTool ‘ImageInfo’;

my $trackdir = $ARGV[0];
opendir(DIR, $trackdir) || die(”unable to open directory $trackdir”);
my @tracks = grep { /.mp3/i } readdir DIR;
closedir DIR;
my $exifTool = new Image::ExifTool;

foreach (@tracks) {
my $filename = “$trackdir/$_”;

$exifTool->ExtractInfo($filename);

my $title = $exifTool->GetValue(’Title’);
my $album = $exifTool->GetValue(’Album’);
my $artist = $exifTool->GetValue(’Artist’);
my $genre = $exifTool->GetValue(’Genre’);
my $track = $exifTool->GetValue(’Track’);

$track =~ /[^0-9]*([0-9]+)[^0-9]*/;
$track = $1;

print STDERR “$artist $album $title $genre $track\n”;

$track = sprintf(”%02d”, $track);
my $newname = “$artist-$album-$track-$title”;
$newname =~ s/[^A-Za-z0-9\-\.]+/_/g;
rename(”$trackdir/$_”,”${trackdir}/${newname}.mp3″);

}


Apr 19 2009

rename file extensions

Category: documentationadmin @ 12:59 pm

# moves everything from .JPG to .jpg
file in *.JPG ; do mv $file `echo $file | sed ’s/\(.*\.\)JPG/\1jpg/’` ; done


Apr 19 2009

ping network or range in network

Category: documentation, scriptsadmin @ 12:58 pm

#!/usr/bin/env bash
## Ping all machines in a Network
PING=”/bin/ping”
echo “Enter Subnet(eg:192.168.xxx)”
read Subnet
echo “Do you want to PING the entire network or a RANGE of IPs ? Enter your choice”
echo 1. Ping Entire Network
echo 2. Ping a RANGE
read choice

if [ $choice = 1 ];
then
{
echo Pinging…..
for((i=1;i<255;i++)); do
${PING} 192.168.${Subnet}.${i} -c 1 > /dev/null 2> /dev/null
if [ $? -eq 0 ];
then
echo -e “${Subnet}.${i} is up”
fi
done
}
fi

if [ $choice = 2 ];
then
{
echo Enter the Starting IP of Range
read a
echo Enter the Last IP of Range
read b
echo Pinging…..
for((i=$a;i<$b;i++)); do
#      ${PING} ${Subnet}.${i} -c 1 > /dev/null 2> /dev/null
${PING} 192.168.${Subnet}.${i} -c 1 > /dev/null 2> /dev/null
if [ $? -eq 0 ];
then
echo -e “${Subnet}.${i} is up”
fi
done
}
fi
exit 0


Apr 19 2009

m4a to mp3

Category: documentation, scriptsadmin @ 12:57 pm

#!/bin/bash
for i in *.m4a
do
faad “$i”
x=`echo “$i”|sed -e ’s/.m4a/.wav/’`
y=`echo “$i”|sed -e ’s/.m4a/.mp3/’`
lame -h -b 192 “$x” “$y”
rm “$x”


Apr 19 2009

find word in directory of files

Category: documentationadmin @ 12:56 pm

# find /start/dir -exec grep -q my_search_word {} \; -print


Apr 19 2009

recursive find and replace in filename

Category: documentationadmin @ 12:55 pm

the example given here is for file extensions:

# find -iname “*fileExtension” -exec sed -i ’s/search/replace/’ {} \;

example:
# find -iname “*html” -exec sed -i ’s/shtml/html/’ {} \;


Apr 19 2009

commandline iso burning

Category: documentationadmin @ 12:53 pm

#dvdisos:
growisofs –dvd-compat -Z /dev/dvdrw=/path/to/file.iso
#cdisos:
cdrecord -v -pad speed=1 dev=/dev/hda src.iso


Apr 19 2009

cisco console cable db9 cat5 adapter

Category: documentation, hardwareadmin @ 12:37 pm

pinouts from db9 to cat5 for cisco console cables:

db9      cat5

1          2 - orange

2          3 - white green

3          6 - green

4          7 - white brown

5          4 - blue, also to 5 - white blue

6          2 - orange

7          8 - brown

8          1 - white orange

9


Apr 19 2009

slackware clean install mysql error

Category: documentationadmin @ 12:32 pm

this is actually not an error when mysql_intall_db is run as the mysql user, but if that is run as root when building the initial tables, it makes the directory /var/lib/mysql unwritable to the mysql user. quick fix even when the install is run as root:

# chown -R mysql.mysql /var/lib/mysql


Apr 19 2009

rcs serial printer pinouts for ethernet runs

Category: documentation, hardwareadmin @ 12:27 pm

ok so ran into a situation where we had to run a serial printer from a good 40 feet so we layed down a cat 5 wire and decided to map the pinouts of the factory cable to see if we could get it to run on the cat 5. we succeeded and the pinouts are below:

DB25     Signal Name     DB9     Signal Name

12          CD                    4          DTR

3            RD                   3           TD

2            TD                    2           RD

20          DTR                 6            DSR

7            Ground            5            Ground

this works when hardware handshakes are set to DSR only


Next Page »