Add Scroogle to your search area in Firefox 2.0 Install the 'Scroogle Scraper' search plugin.

how tos


Recently I helped direct and produce a biographical documentary. Here’s the equipment list I used:

  • Canon XHA1 video camera
  • Camera tripod
  • Boom pole
  • Directional mic with windscreen (dead cat)
  • XLR cables
  • MiniDV tapes
  • Macbook Pro w/ iMovie and iDVD
  • Dell Laptop with photoshop
  • Epson flatbed scanner
  • Radio Shack 3 channel audio mixer
  • Sennheiser condenser microphone with stand (for narration)
  • External 1TB drive
  • Mediawiki
  • Royalty free music (http://incompetech.com/m/c/royalty-free/)

Do I know anything about film making? Not really. I did read a bunch of books. And I watched an awful lot of documentaries to get ideas. Special thanks to Tyler T. for the technical advice!

ME: did you install xampp?
ME: and, in the xampp control panel, did you start apache?
ME: and, in a browser, did you go to http://localhost
ME: and, once, there, did you see a xampp welcome message?
SOMEGUY: yes, yes and yes
ME: when you go to http://www.whatismyip.com what does it say for your ip address?
SOMEGUY: [address ]
ME: is that computer running microsoft’s firewall? if so, can you shut it off?
SOMEGUY: ok
ME: are you using a local router/firewall? if so, you need to let/forward port 80 through to that “server”
ME: the point is that port 80 is not responding externally, so we need to fix it. to get into your router, you just need to know your default gateway.
ME: start->run
ME: type “cmd”
ME: then type “ipconfig” (no quotes) and press enter
ME: you’re looking for the Default Gateway IP address
SOMEGUY: it is 192.168.1.1
ME: ok. go to that in a browser
ME: if you use default linksys settings, there will be no username and the password is admin
ME: ok, so there should be some provision for forwarding ports.
ME: sometimes it’s under firewall->single port forwarding
ME: you’ll need to forward port 80 to the ip address of that server computer
ME: it says prot range forward
ME: yeah, so you can forward 80 to 80 to the ip of the server at 80 to 80
ME: you can find the ip of that server by doing the start->run, cmd, ipconfig command again
ME: go to http://www.[sitename].com/ (i set up DNS for you)
ME: does it work for you?
SOMEGUY: it brings up xampp for windows
ME: yup, that means it’s working
ME: ok, now we need to edit us some files
ME: step 1
ME: in that folder create a file called index.html, and in that file put “hello world”
ME: you could use notepad to create a new text file, but when you save it, be sure it doesn’t append a .txt to the end of index.html
SOMEGUY: can i use word
ME: if word allows you save in plain text format, then yes
ME: again, make sure the file name is index.html and not index.html.txt
ME: when you browse that folder (c:\xampp\htdocs\[sitename]) can you now see a little browser file icon called index, and if you double click it, does ie open a window with the text you typed in?
SOMEGUY: yes
ME: now time to edit another file
ME: go to: C:\xampp\apache\conf\extra
ME: and use notepad to edit httpd-vhosts.conf
ME: delete everything out of that file, and paste in the following:
ME: NameVirtualHost *:80

DocumentRoot “C:\xampp\htdocs\[sitename]”
ServerName *.[sitename].com

ME: then save that file
ME: and then stop and start xampp
ME: from the control panel
ME: start and stop apache, i mean, from the control panel
ME: go to http://www.[sitename].com/
SOMEGUY: i stopped it and started it
ME: what do you see?
SOMEGUY: HELLO WORLD
ME: that’s what I see, too. you’re hosting a webpage now for the ENTIRE WORLD!!!
ME: you’ll probably need dreamweaver (which you can get a trial version free download) to start pimping out your site
ME: the point is that anything you place in c:\xampp\htdocs\[sitename] will be accessable to the world on www.[sitename].com
ME: so, if you had an mp3 called “mysong.mp3″ and you copied it into c:\xampp\htdocs\[sitename] your friends could download it by going to http://www.[sitename].com/mysong.mp3
ME: the html files are for your webpages, but the server will serve up any file you place in that folder
SOMEGUY: how do i make links
ME: dreamweaver is a good editor and you can get lots of cool templates free.
ME: in dreamweaver it’s easy. if you’re editing raw html text, a link looks like this
SOMEGUY: i now have an mp3 in that folder
ME: obviously, you don’t want the mpaa to know you’re hosting mp3s. it’s illegal and all. i was just providing you an example
ME: that index file is the root file that apache/xampp will serve up if the filename is not explicited stated in the URL. you should just point dreamweaver to that file to edit it.
ME: you can, obviously, add more files to that folder, for other pages on your site. maybe a songs.html, for a list of your songs. then you just link to songs.html from your index.html
ME: as well, because apache/xampp uses index.html as the default name, if you wanted www.[sitename].com/songs to work (instead of songs.html), you simply need to create a subfolder in c:\xampp\htdocs\[sitename] called songs and put an index.html file in that subfolder with your song list

this script checks to see if a program is running and starts it if it is not. if a certain time has passed the script will kill the running program

#!/bin/bash
 
#location of script to monitor
PROGRAM=‘myscript.php’
COUNTER=0
 
#!/bin/bash
 
date2stamp () {
    date –utc –date "$1" +%s
}
 
# convert a date into a UNIX timestamp
# time afterwhich script should not run
finishtime=$(date2stamp "Thu Nov  1 15:22:00 MDT 2007")
#echo $finishtime
 
while [ 1 ];
do
 
nowtime=`date –utc +%s`
#echo $nowtime
diffTime=$((finishtime-nowtime))
if ((diffTime > 0));
then
echo "still time to go"
else
echo "TIME UP!: checking if running:"
PROG_CHECK=`ps aux|grep $PROGRAM|wc -l`
if [ $PROG_CHECK -gt 1 ];
then
echo "running after time up"
PROG_ID=`ps uax|grep $PROGRAM |head -n 1|awk ‘{print $2}’`
#echo "KILLING"
#kill -9 $PROG_ID
else
echo "not running after time up"
fi
exit 65
fi
 
 
PROG_CHECK=`ps aux|grep $PROGRAM|wc -l`
if [ $PROG_CHECK -gt 1 ];
then
echo "running"
else
let COUNTER=COUNTER+1
echo "not running: starting: new log file: $COUNTER"
/usr/local/bin/php /root/$PROGRAM &
fi
 
#time in seconds to sleep
sleep 5
 
done

We recently upgraded from MySQL 4 to MySQL 5 and we noticed strange characters in some of the varchar and text fields.

step 1: dump out the contents of the bad field in hex
mysql> select hex(myfieldname) from mytablename where myid=’something’;

step 2: run a php program to print out the chars one at a time

function hex2asc($temp) {
  $len = strlen($temp);
  for ($i=0;$i<$len;$i+=2) {
  $data[$i]=chr(hexdec(substr($temp,$i,2)))."  ".substr($temp,$i,2);
 
  }
  return $data;
}
$str="HEX GOES HERE";
$data=hex2asc($str);
print_r($data);

step 3: once you’ve identified the bad chars and their hex values, change them in the database

here are some bad chars I found:

– fix apostrophe
update mytablename set myfieldname=REPLACE(myfieldname,UNHEX(’92′),”‘”);

– fix left single quote
update mytablename set myfieldname=REPLACE(myfieldname,UNHEX(’93′),”‘”);

– fix right single quote
update mytablename set myfieldname=REPLACE(myfieldname,UNHEX(’94′),”‘”);

– fix bullets
update mytablename set myfieldname=REPLACE(myfieldname,UNHEX(’95′),”& #8226;”);

– fix double dash
update mytablename set myfieldname=REPLACE(myfieldname,UNHEX(’96′),”–”);

– fix triple dash
update mytablename set myfieldname=REPLACE(myfieldname,UNHEX(’97′),”—”);

— fix supscripted TM
update mytablename set myfieldname=REPLACE(myfieldname,UNHEX(’99′),”<sup>TM</sup>”);

– replace jacked up apostrophe/single quote
– delete EFs
update mytablename set myfieldname=REPLACE(myfieldname,UNHEX(’EF’),”");
– replace BFs with single quote
update mytablename set myfieldname=REPLACE(myfieldname,UNHEX(’BF’),”‘”);
– delete BDs
update mytablename set myfieldname=REPLACE(myfieldname,UNHEX(’BD’),”");

see also: http://www.oreillynet.com/onlamp/blog/2006/01/turning_mysql_data_in_latin1_t.html

Synergy is a useful tool for sharing a keyboard and mouse between two computers without all those annoying KVM cables. All you need is a network connection for the two.
Server Computer Setup

  • download and install the exe
  • select (*) share this computer’s keyboard and mouse (server)
  • Click the Configure… button
  • Uder the Screens box, click the + button
  • Add a screen for the server. Type the host name into the Screen Name textbox. To find the host name for your computer, type ipconfig /all in a cmd box and look for “Host Name”. My laptop’s hostname is D4LMXG91. click OK
  • Repeat the process and add a new screen for the host computer’s host name. My host is D4LMXG92
  • Under Links, select the [New Link] item and then fill out the boxes so they say: “0 to 100% of the left of [server name] goes to 0 to 100% of [host name]. Then click on the + button.
  • select the [New Link] item again and fill out the options so they say: “0 to 100% of the right of [host name] goes to 0 to 100% of [server name]”. click on the plus
  • Click OK
  • Click Start.

Host Computer Setup

  • install the software
  • select (*) Use another computer’s shared keyboard and mouse (client).
  • Type in the IP address of the server computer
  • Click Start

You should now be able to move the mouse off the left of the server computer and land on the right side of the host computer. In addition, they now share a clipboard. Not too shabby, eh?

Send to a friend * Print this page * Join the club * Talk with my robot * Advertise here * Search this Site * Donate * Link to me


Web hosting by Utah Hub *  Powered by CreativeTap *  In association with Segomo
Unless otherwise noted, Copyright 2004-2006, Ryan Byrd. All Rights Reserved.
Ryan Byrd dot net -- probably the coolest site in Utah