Wednesday, February 17, 2010

Infusion: Triple Crisp Strawberry

Ingredients:

1x Bottle of 750ml Vodka ( Costco Generic, Grey Goose, Smirnoff, Sky )
2x cartons of Strawberries
1x shot 2oz glass of Generic Everclear
1x funnel
2x Empty 750ml bottle
3x coffee filters

Steps:

1. Remove 1 cup of Vodka from the bottle.
2. Use potato skinner to remove red skins from 2/3 a carton of strawberries.
NOTE: Avoid getting the white part past the skin, but a little is ok.
3. slice strawberry skins thinly so they will fit in the bottles neck with out forcing them.
4. place the berry skins in the bottle and seal bottle so it is air tight.
5. Let rest until skins are white. ( 24 to 48 hours )
6. Wet a coffee filter and put it in a funnel.
7. Place funnel neck into another 750ml bottle.
8. Slowly pour vodka so it will filter through the coffee filter, and into the bottle below catching the fruit.
9. Bag white fruit and freeze.
NOTE: For the fruit you can either fondue it / chocolate dip it / or use it in blended fruit alc. beverages.
10. Repeat steps 2-9 two additional times.
11. Add shot of everclear to infusion to restore alc. content.
12. Enjoy - add simple syrup as needed.

Back on the weightloss crusade

Yea so the Holidays are over, and the anniversaries are over so I can get back to weight loss. Time to get back on the horse and break into the 200's.

Friday, February 12, 2010

Bought a Few servers!

YAY Me!

Bought a few old DL140's -> http://oink.com/misc/dl140g1/

What I got:

2x DL140 Server U1.
-Free Rails for a rackmount
-NO CDROM ( Didnt want )
-80GB PATA HD
-1GB ECC Ram ( Single Chip - Upgrade costs ~60$ to 4GB )
-3.06 Ghz Xeon Processor (single CPU - Ideal Mate for it ~80$ )
-2xGigbit Ethernet ( btw - Both work with Ubuntu 9.10 )

So yea, the form factor was what I was looking for, for the price I was looking for. I had to make a install on a stick with Ubuntu 9.10 server. Plugged it in, and ran installer with success! Needless to say, I still haven't unwrapped the second one yet though.

Needless to say it works like a dream, and ill be excited to play with them a bit.

Working with Php

Nothing like banging your head against a brick wall....

HAHAHA - Php for you some times .. >.> So the deal is I have picked up a more significant amount of marketing responsibility with my company lately and it has basically forced me to learn PHP to create WUI tools to use.

So Im basically going to have to learn how to build classes and use them for larger sorting.

Interesting though :)

Tuesday, November 3, 2009

Hackintosh

It seems like, the if not even more rogue "group of hackintosh" might hit a stumbling block:

http://osxdaily.com/2009/10/31/hackintosh-netbook-users-take-note-snow-leopard-10-6-2-update-kills-support-for-atom-processor/

which let me make something clear - QUIT SHOOTING YOURSELF IN THE FOOT APPLE!

I mean do we all really have to pay for your overpriced laptops with sub-par parts. What is so hard about being a bit more like linux? Why not extend a development branch to arm/mips-el/amd - kernel drives and kernel building kit would be a appreciated. Why not have broader hardware support like the BSD's/Linux? ffs make a modular Kernel with autodetect and activate driver support! your a multi million if not billion company - challenge yourself!

-Dont charge 1800$ for a 30" monitor thats CRAP! they are much cheaper online for the same or better parts.
-Dont charge 900$ for a 24" monitor - where I have found one for 250$ that is comparable if not better.

ARE YOU FUCKING KIDDING ME IM PAYING ALMOST 3x more for a stupid logo?? REALLY?! Your no better then micro-shaft with there bloatware OS! Im mean really what would hurt if you took a page from some of the Community maintained OS's out there?

- Better support
- More Architectures
- More Driver choices
- Reasonable if not competitive with retail prices
- Commission based OS application development

I once heard a Microsoft sales guy say something very,very true as much as I hated hearing it, it had a ring of truth:

"You meet many pure Linux and Windows developers, but when was the last time you ever met a pure Mac developer?"

In truth I've never met a "Mac only developer" in fact i've met very few Linux developers that will even touch MAC's and the few that do develop there software for MAC's none of them do any such "Hardware/firmware" level development.

I can see it your way though too -a high level of "working" products with "quality" but what makes you any better or different from Microsoft. I have yet to see a difference.

MIT Open Courseware

Apparently "open" course guidelines and such for structured classes from MIT and a few other one off online schools.

http://www.onlinecourses.org/2009/10/28/100-incredible-open-courses-for-the-ultimate-tech-geek/

So far i've actually worked through the beginners Python class. Its not bad.

Tuesday, October 13, 2009

[ Linux ] maint2.sh

Kind of a Key service restart if put on a cron or scron

#!/bin/sh
# This script is meant to restart key services on a vps or server.
# Written by L.C. Version 2.0

logz=/var/log/maint_sh.log

pstree | grep ssh >/dev/null; if [ $? -eq 1 ]
then
{
/etc/init.d/`ls /etc/init.d/ | grep ss*` restart
echo "MAINT.SH: SSH restarted: `date`" >>$logz
}
fi
pstree | grep mysql >/dev/null; if [ $? -eq 1 ]
then
{
/etc/init.d/`ls /etc/init.d/ | grep mysql` restart
echo "MAINT.SH: MySQL restarted: `date`" >>$logz
}
fi
pstree | grep master >/dev/null; if [ $? -eq 1 ]
then
{
/etc/init.d/`ls /etc/init.d/ | grep postfix` restart
echo "MAINT.SH: POSTFIX restarted: `date`" >>$logz
}
fi

[ Linux ] Postfix Log Analyzer for dead addresses

#!/bin/bash
# This system filters the current maillog or mail.log and provides data on what email addresses are bad!

logs=`for logfile in /var/log/mail{.,}log; do if [ -f $logfile ]; then echo $logfile; fi; done` && echo $logs
add_log=/root/bounces.txt
rec_log=/root/bounce_record.log

if date | grep Sat | grep "21:1" >/dev/null;
then
{
gunzip mail.log.*.gz

echo "Starting : `date`" >> $rec_log

egrep -i '(Not\ a\ valid\ mailbox|User\ is\ unknown|Undeliverable\ address|recipient\ rejected|user\ unknown|invalid\ recipient\:|address\ rejected|Does\ not\ exist|Illegal\ alias|mailbox|Mailbox\ is\ inactive|reach\ is\ disabled|Mailbox\ disabled )' $logs | egrep -v -i '(policy|spam|grey?list|sender|dns|spf\ record|reverse|quota|acces\ denied|unavail|later|try|headach|temporar|full|too\ many|root|esozm)' | grep "@" | awk '{print $7}' | grep -v "host" >$add_log
   
echo " Tabulating amount of records: " >> $rec_log

egrep -i '(Not\ a\ valid\ mailbox|User\ is\ unknown|Undeliverable\ address|recipient\ rejected|user\ unknown|invalid\ recipient\:|address\ rejected|Does\ not\ exist|Illegal\ alias|mailbox|Mailbox\ is\ inactive|reach\ is\ disabled|Mailbox\ disabled )' $logs | egrep -v -i '(policy|spam|grey?list|sender|dns|spf\ record|reverse|quota|acces\ denied|unavail|later|try|headach|temporar|full|too\ many|root|esozm)' | grep -c "@" >>$rec_log

echo "Finishing : `date`" >> $rec_log
echo "dun dun dun done"

}
else
{
echo "Not time to process the mail logs"
}
fi

[ Linux ] x_hk.sh

This script came via the neccesity to abolish services that would result in a reboot/cpanel/panels that inject restart commands onto vps's. As you see it could run alot everyday if something was making it run every 5 minutes like scron.

## x_hk.sh (x-hunter-kill script) ##

#!/bin/bash
# Killer script
# x_hk.sh - includes date.

if date | grep "1:1" >/dev/null;
then
{
echo "### Running the [HK] process on this cycle ###"
echo " "
echo "## clearing the crontab ##"
crontab -r
echo "## trying to kill: httpd ##"
pgrep httpd | xargs -r kill -9
echo "## trying to kill: apache2 ##"
pgrep apache2 | xargs -r kill -9
echo "## trying to kill: xinetd ##"
pgrep xinetd | xargs -r kill -9
echo "## trying to kill: named ##"
pgrep named | xargs -r kill -9
}
else
{
echo "### Not running the [HK] process on this cycle ###"
echo "Current Time: `date`"
echo " "
}
fi

Friday, October 2, 2009

[ Centos ] Postfix dsn status script

Centos postfix DSN translation script - tells you what your mail is doing. In case you have no clue what we are chatting about view your maillog/mail.log :

Oct 1 00:35:01 ghosting postfix/smtp[1437]: ABA987666094: to=, relay=gmail-smtp-in.l.google.com[209.85.222.73]:25, delay=9881, delays=9880/0.01/0.22/0.71, dsn=2.0.0, status=sent (250 2.0.0 OK 1254342900 5si70217753pzk.88)

This largely tells you what has been done with your mail when the "status=xxxxxx" line or the message of why your mail fails is "vague".

file: centos_postfix_dsn_translator.sh

#!/bin/bash
##########################################
# Postfix DSN Script Based off of rfc3463
# http://www.faqs.org/rfcs/rfc3463.html
# Written by L.C.
# DSN rfc's refer to rfc3461-rfc3464
##########################################

######################################################
# Persistent Transient Failure Aka Deferred 4.xxx.xxx
######################################################

# Other or Undefined Status #
echo "Deferred :: 4.0.0 :: Other Undefined Status :"`cat /var/log/maillog | grep -c "dsn=4.0.0"`
echo " "
# Address Status #
echo "Deferred :: 4.1.0 :: Other address status :"`cat /var/log/maillog | grep -c "dsn=4.1.0"`
echo "Deferred :: 4.1.1 :: Bad destination mailbox address :"`cat /var/log/maillog | grep -c "dsn=4.1.1"`
echo "Deferred :: 4.1.2 :: Bad destination system address :"`cat /var/log/maillog | grep -c "dsn=4.1.2"`
echo "Deferred :: 4.1.3 :: Bad destination mailbox address syntax :"`cat /var/log/maillog | grep -c "dsn=4.1.3"`
echo "Deferred :: 4.1.4 :: Destination mailbox address ambiguous :"`cat /var/log/maillog | grep -c "dsn=4.1.4"`
echo "Deferred :: 4.1.5 :: Destination mailbox address valid :"`cat /var/log/maillog | grep -c "dsn=4.1.5"`
echo "Deferred :: 4.1.6 :: Mailbox has moved :"`cat /var/log/maillog | grep -c "dsn=4.1.6"`
echo "Deferred :: 4.1.7 :: Bad sender's mailbox address syntax :"`cat /var/log/maillog | grep -c "dsn=4.1.7"`
echo "Deferred :: 4.1.8 :: Bad sender's system address :"`cat /var/log/maillog | grep -c "dsn=4.1.8"`
echo " "
# Mailbox Status #
echo "Deferred :: 4.2.0 :: Other or undefined mailbox status :"`cat /var/log/maillog | grep -c "dsn=4.2.0"`
echo "Deferred :: 4.2.1 :: Mailbox disabled, not accepting messages :"`cat /var/log/maillog | grep -c "dsn=4.2.1"`
echo "Deferred :: 4.2.2 :: Mailbox full :"`cat /var/log/maillog | grep -c "dsn=4.2.2"`
echo "Deferred :: 4.2.3 :: Message length exceeds administrative limit :"`cat /var/log/maillog | grep -c "dsn=4.2.3"`
echo "Deferred :: 4.2.4 :: Mailing list expansion problem :"`cat /var/log/maillog | grep -c "dsn=4.2.4"`
echo " "
# Mail system status #
echo "Deferred :: 4.3.0 :: Other or undefined mail system status :"`cat /var/log/maillog | grep -c "dsn=4.3.0"`
echo "Deferred :: 4.3.1 :: Mail system full :"`cat /var/log/maillog | grep -c "dsn=4.3.1"`
echo "Deferred :: 4.3.2 :: System not accepting network messages :"`cat /var/log/maillog | grep -c "dsn=4.3.2"`
echo "Deferred :: 4.3.3 :: System not capable of selected features :"`cat /var/log/maillog | grep -c "dsn=4.3.3"`
echo "Deferred :: 4.3.4 :: Message too big for system :"`cat /var/log/maillog | grep -c "dsn=4.3.4"`
echo " "
# Network and Routing Status #
echo "Deferred :: 4.4.0 :: Other or undefined network or routing status :"`cat /var/log/maillog | grep -c "dsn=4.4.0"`
echo "Deferred :: 4.4.1 :: No answer from host :"`cat /var/log/maillog | grep -c "dsn=4.4.1"`
echo "Deferred :: 4.4.2 :: Bad connection :"`cat /var/log/maillog | grep -c "dsn=4.4.2"`
echo "Deferred :: 4.4.3 :: Routing server failure :"`cat /var/log/maillog | grep -c "dsn=4.4.3"`
echo "Deferred :: 4.4.4 :: Unable to route :"`cat /var/log/maillog | grep -c "dsn=4.4.4"`
echo "Deferred :: 4.4.5 :: Network congestion :"`cat /var/log/maillog | grep -c "dsn=4.4.5"`
echo "Deferred :: 4.4.6 :: Routing loop detected :"`cat /var/log/maillog | grep -c "dsn=4.4.6"`
echo "Deferred :: 4.4.7 :: Delivery time expired :"`cat /var/log/maillog | grep -c "dsn=4.4.7"`
echo " "
# Mail Delivery Protocol Status #
echo "Deferred :: 4.5.0 :: Other or undefined protocol status :"`cat /var/log/maillog | grep -c "dsn=4.5.0"`
echo "Deferred :: 4.5.1 :: Invalid command :"`cat /var/log/maillog | grep -c "dsn=4.5.1"`
echo "Deferred :: 4.5.2 :: Syntax error :"`cat /var/log/maillog | grep -c "dsn=4.5.2"`
echo "Deferred :: 4.5.3 :: Too many recipients :"`cat /var/log/maillog | grep -c "dsn=4.5.3"`
echo "Deferred :: 4.5.4 :: Invalid command arguments :"`cat /var/log/maillog | grep -c "dsn=4.5.4"`
echo "Deferred :: 4.5.5 :: Wrong protocol version :"`cat /var/log/maillog | grep -c "dsn=4.5.5"`
echo " "
# Message Content or Message Media Status #
echo "Deferred :: 4.6.0 :: Other or undefined media error :"`cat /var/log/maillog | grep -c "dsn=4.6.0"`
echo "Deferred :: 4.6.1 :: Media not supported :"`cat /var/log/maillog | grep -c "dsn=4.6.1"`
echo "Deferred :: 4.6.2 :: Conversion required and prohibited :"`cat /var/log/maillog | grep -c "dsn=4.6.2"`
echo "Deferred :: 4.6.3 :: Conversion required but not supported :"`cat /var/log/maillog | grep -c "dsn=4.6.3"`
echo "Deferred :: 4.6.4 :: Conversion with loss performed :"`cat /var/log/maillog | grep -c "dsn=4.6.4"`
echo "Deferred :: 4.6.5 :: Conversion failed :"`cat /var/log/maillog | grep -c "dsn=4.6.5"`
echo " "
# Security or Policy Status #
echo "Deferred :: 4.7.0 :: Other or undefined security status :"`cat /var/log/maillog | grep -c "dsn=4.7.0"`
echo "Deferred :: 4.7.1 :: Delivery not authorized, message refused :"`cat /var/log/maillog | grep -c "dsn=4.7.1"`
echo "Deferred :: 4.7.2 :: Mailing list expansion prohibited :"`cat /var/log/maillog | grep -c "dsn=4.7.2"`
echo "Deferred :: 4.7.3 :: Security conversion required but not possible :"`cat /var/log/maillog | grep -c "dsn=4.7.3"`
echo "Deferred :: 4.7.4 :: Security features not supported :"`cat /var/log/maillog | grep -c "dsn=4.7.4"`
echo "Deferred :: 4.7.5 :: Cryptographic failure :"`cat /var/log/maillog | grep -c "dsn=4.7.5"`
echo "Deferred :: 4.7.6 :: Cryptographic algorithm not supported :"`cat /var/log/maillog | grep -c "dsn=4.7.6"`
echo "Deferred :: 4.7.7 :: Message integrity failure :"`cat /var/log/maillog | grep -c "dsn=4.7.7"`
echo " "
############################################
# Permanent Failure's Aka Bounces 5.xxx.xxx
############################################

# Other or Undefined Status #
echo "Bounced :: 5.0.0 :: Other Undefined Status :"`cat /var/log/maillog | grep -c "dsn=5.0.0"`
echo " "
# Address Status #
echo "Bounced :: 5.1.0 :: Other address status :"`cat /var/log/maillog | grep -c "dsn=5.1.0"`
echo "Bounced :: 5.1.1 :: Bad destination mailbox address :"`cat /var/log/maillog | grep -c "dsn=5.1.1"`
echo "Bounced :: 5.1.2 :: Bad destination system address :"`cat /var/log/maillog | grep -c "dsn=5.1.2"`
echo "Bounced :: 5.1.3 :: Bad destination mailbox address syntax :"`cat /var/log/maillog | grep -c "dsn=5.1.3"`
echo "Bounced :: 5.1.4 :: Destination mailbox address ambiguous :"`cat /var/log/maillog | grep -c "dsn=5.1.4"`
echo "Bounced :: 5.1.5 :: Destination mailbox address valid :"`cat /var/log/maillog | grep -c "dsn=5.1.5"`
echo "Bounced :: 5.1.6 :: Mailbox has moved :"`cat /var/log/maillog | grep -c "dsn=5.1.6"`
echo "Bounced :: 5.1.7 :: Bad sender's mailbox address syntax :"`cat /var/log/maillog | grep -c "dsn=5.1.7"`
echo "Bounced :: 5.1.8 :: Bad sender's system address :"`cat /var/log/maillog | grep -c "dsn=5.1.8"`
echo " "
# Mailbox Status #
echo "Bounced :: 5.2.0 :: Other or undefined mailbox status :"`cat /var/log/maillog | grep -c "dsn=5.2.0"`
echo "Bounced :: 5.2.1 :: Mailbox disabled, not accepting messages :"`cat /var/log/maillog | grep -c "dsn=5.2.1"`
echo "Bounced :: 5.2.2 :: Mailbox full :"`cat /var/log/maillog | grep -c "dsn=5.2.2"`
echo "Bounced :: 5.2.3 :: Message length exceeds administrative limit :"`cat /var/log/maillog | grep -c "dsn=5.2.3"`
echo "Bounced :: 5.2.4 :: Mailing list expansion problem :"`cat /var/log/maillog | grep -c "dsn=5.2.4"`
echo " "
# Mail system status #
echo "Bounced :: 5.3.0 :: Other or undefined mail system status :"`cat /var/log/maillog | grep -c "dsn=5.3.0"`
echo "Bounced :: 5.3.1 :: Mail system full :"`cat /var/log/maillog | grep -c "dsn=5.3.1"`
echo "Bounced :: 5.3.2 :: System not accepting network messages :"`cat /var/log/maillog | grep -c "dsn=5.3.2"`
echo "Bounced :: 5.3.3 :: System not capable of selected features :"`cat /var/log/maillog | grep -c "dsn=5.3.3"`
echo "Bounced :: 5.3.4 :: Message too big for system :"`cat /var/log/maillog | grep -c "dsn=5.3.4"`
echo " "
# Network and Routing Status #
echo "Bounced :: 5.4.0 :: Other or undefined network or routing statu :"`cat /var/log/maillog | grep -c "dsn=5.4.0"`
echo "Bounced :: 5.4.1 :: No answer from host :"`cat /var/log/maillog | grep -c "dsn=5.4.1"`
echo "Bounced :: 5.4.2 :: Bad connection :"`cat /var/log/maillog | grep -c "dsn=5.4.2"`
echo "Bounced :: 5.4.3 :: Routing server failure :"`cat /var/log/maillog | grep -c "dsn=5.4.3"`
echo "Bounced :: 5.4.4 :: Unable to route :"`cat /var/log/maillog | grep -c "dsn=5.4.4"`
echo "Bounced :: 5.4.5 :: Network congestion :"`cat /var/log/maillog | grep -c "dsn=5.4.5"`
echo "Bounced :: 5.4.6 :: Routing loop detected :"`cat /var/log/maillog | grep -c "dsn=5.4.6"`
echo "Bounced :: 5.4.7 :: Delivery time expired :"`cat /var/log/maillog | grep -c "dsn=5.4.7"`
echo " "
# Mail Delivery Protocol Status #
echo "Bounced :: 5.5.0 :: Other or undefined protocol status :"`cat /var/log/maillog | grep -c "dsn=5.5.0"`
echo "Bounced :: 5.5.1 :: Invalid command :"`cat /var/log/maillog | grep -c "dsn=5.5.1"`
echo "Bounced :: 5.5.2 :: Syntax error :"`cat /var/log/maillog | grep -c "dsn=5.5.2"`
echo "Bounced :: 5.5.3 :: Too many recipients :"`cat /var/log/maillog | grep -c "dsn=5.5.3"`
echo "Bounced :: 5.5.4 :: Invalid command arguments :"`cat /var/log/maillog | grep -c "dsn=5.5.4"`
echo "Bounced :: 5.5.5 :: Wrong protocol version :"`cat /var/log/maillog | grep -c "dsn=5.5.5"`
echo " "
# Message Content or Message Media Status #
echo "Bounced :: 5.6.0 :: Other or undefined media error :"`cat /var/log/maillog | grep -c "dsn=5.6.0"`
echo "Bounced :: 5.6.1 :: Media not supported :"`cat /var/log/maillog | grep -c "dsn=5.6.1"`
echo "Bounced :: 5.6.2 :: Conversion required and prohibited :"`cat /var/log/maillog | grep -c "dsn=5.6.2"`
echo "Bounced :: 5.6.3 :: Conversion required but not supported :"`cat /var/log/maillog | grep -c "dsn=5.6.3"`
echo "Bounced :: 5.6.4 :: Conversion with loss performed :"`cat /var/log/maillog | grep -c "dsn=5.6.4"`
echo "Bounced :: 5.6.5 :: Conversion failed :"`cat /var/log/maillog | grep -c "dsn=5.6.5"`
echo " "
# Security or Policy Status #
echo "Bounced :: 5.7.0 :: Other or undefined security status :"`cat /var/log/maillog | grep -c "dsn=5.7.0"`
echo "Bounced :: 5.7.1 :: Delivery not authorized, message refused :"`cat /var/log/maillog | grep -c "dsn=5.7.1"`
echo "Bounced :: 5.7.2 :: Mailing list expansion prohibited :"`cat /var/log/maillog | grep -c "dsn=5.7.2"`
echo "Bounced :: 5.7.3 :: Security conversion required but not possible :"`cat /var/log/maillog | grep -c "dsn=5.7.3"`
echo "Bounced :: 5.7.4 :: Security features not supported :"`cat /var/log/maillog | grep -c "dsn=5.7.4"`
echo "Bounced :: 5.7.5 :: Cryptographic failure :"`cat /var/log/maillog | grep -c "dsn=5.7.5"`
echo "Bounced :: 5.7.6 :: Cryptographic algorithm not supported :"`cat /var/log/maillog | grep -c "dsn=5.7.6"`
echo "Bounced :: 5.7.7 :: Message integrity failure :"`cat /var/log/maillog | grep -c "dsn=5.7.7"`
echo " "
############################################
# Custom Errors x.8.xxx & Success 2.xxx.xxx
############################################
echo "Sent Mail :: 2.0.0 :: Message Sent :"`cat /var/log/maillog | grep -c "dsn=2.0.0"`
echo " "
echo "Custom successes :: 2.8.x :: Custom sent Message :"`cat /var/log/maillog | grep "dsn=2." | grep -v "dsn=2.0.0" | grep -c "dsn=2."`
echo "Custom deferres :: 4.8.x :: Custom defferes Message :"`cat /var/log/maillog | grep -c "dsn=4.8."`
echo "Custom failures :: 5.8.x :: Custom Failure Message :"`cat /var/log/maillog | grep -c "dsn=5.8."`
############################################
# Filter for all bounced mail
############################################
cat /var/log/maillog | grep ": to=<" | grep -v "dsn=4." | grep -v "dsn=2." | awk '{print $7}' | grep -v "to=<\esozm" | grep -v "to=<\root" > bounced.log