Despite it being simple, I always forget the syntax to reset AUTO_INCREMENT in MySQL. I’m posting this for my reference and hopefully others will find it useful.
ALTER TABLE table_name AUTO_INCREMENT = next_increment_number
Despite it being simple, I always forget the syntax to reset AUTO_INCREMENT in MySQL. I’m posting this for my reference and hopefully others will find it useful.
ALTER TABLE table_name AUTO_INCREMENT = next_increment_number
I was looking for a way to have an automated search for some items I’m looking for on Craigslist, but nothing exists in Craigslist to email you daily/weekly for items matching a particular string. I found a few websites that offered this functionality via an application, but I’m not down for that. Instead I wrote this simple korn shell script. Enjoy!
#!/bin/sh
echo "--> Setup...";
directory=/my/dir/for/results/;
filename="craigslist_dell_monitor.html";
path="${directory}${filename}";
website="http://mycity.craigslist.org/search/sss?query=dell+2005fpw&minAsk=min&maxAsk=max"
echo "--> Searching for Dell Monitor...";
wget -O ${path} ${website}
ls -la ${directory}
echo "--> Checking for results...";
cat ${path} | grep "Found:"
if [ $? == 0 ]
then
echo "--> Sending results email...";
echo ${website} | mail -s "craigslist search - Dell Monitor" myemail@gmail.com
else
echo "--> No results.";
fi
exit;
Any guesses on what I was searching for?
So, I’ve decided to start blogging again. This time around I’m going to try and keep things more related to technology. Less stuff about my personal life and thoughts. More stuff around application development and emerging technologies that I’m interested in and learning . I think over the past year or so that I’ve stopped blogging I’ve really gotten behind with architecture frameworks (new and maturing) and new programming concepts. Plus, I guess I might have had some useful information on my site because I’ve had some former readers trying to get a hold of me to get entries that I posted in my old blog. Because of this, I’ll also try to post some of my old entries that could be useful for someone.