Chit chat

———-

In sympathy with Germany, I am getting out my old typewriter.

——————————————————–

Batch file to slowly print out a text file. Perfect for a quickie teleprompter.

——————————————————–

Did you know that you can use the thermistor from a personal computer fan to tell relative temperature?

 

——————————————————–

Normally I probably would not put something like this in the blog. But the more I thought about it, the more I thought it might fit. Like many people who work late at night, you do not want to disturb anyone while building projects. One tool that is very noisy is a drill. There had to be a better way, I looked for an auger in all the stores, but none were to be found except by mail order. Since I make a lot of things, why not make a sort of auger for light projects that would be quiet in use. That is when I came up with a pvc drill. It could always be used a toy for a child in any case.

The hardest thing to possibly implement is a chuck, Was not sure what I was going to do. Happened to be in Harbor Frieght and they actually had one on the shelf. It was reasonable enough, so I purchased one.  You can actually get chucks separately. Then I was on my way to completing the project.More on the project at:
http://www.instructables.com/id/Pvc-Hand-drill/

——————————————————–

Translating from one batch file system to another can be Interesting. Someone wrote a batch file for emulate a menu that could of been a bit more precise for dos, but I decided to translate it to bash.

Dos:

@echo off
color 0e
Title Website Starter (by Prof. Pickle)
:Menu
cls
echo ---------------------------------------------------------------------
echo This is the Website starter
echo.
echo Select the number of the website you wish to select
echo Or press E to exit.
echo ---------------------------------------------------------------------
echo.
echo.
echo 1. facebook
echo 2. youtube
echo 3. google
echo 4. redtube
echo 5. other
set /p web=
If %web% EQU 1 start www.facebook.com
If %web% EQU 1 goto Menu
If %web% EQU 2 start www.youtube.com
If %web% EQU 2 goto Menu
If %web% EQU 3 start www.google.com
If %web% EQU 3 goto Menu
If %web% EQU 4 start www.redtube.com
If %web% EQU 4 goto Menu
If %web% EQU 5 goto other
If %ERRORLEVEL% NEQ 0 goto ERROR
If %web% EQU E goto exit
If %web% EQU e goto exit
goto please
:other
cls
echo You have chosen other
echo.
echo Type the web address of the website (www.website.com)
set /p otherweb=
start %otherweb%
If %ERRORLEVEL% NEQ 0 goto ERROR
:exit
cls
echo Goodbye!
pause > nul
exit
:ERROR
cls
echo Sorry, an error has occurred.
echo.
echo If you were using the "other website" function you may have
echo typed it incorrectly.
echo.
echo Press any key to go back to menu
pause > nul
goto Menu
:please
cls
echo Please press a number from 1-5
echo.
pause
goto Menu

Sure the author worked really hard on it. then I thought how would I do a quick equivalent using bash. To be fair his batch code could of been improved with a while loop.  This is what I came up with:

Bash:
#!/bin/bash
#
# Script to run firefox and load a specific site.
#
while :
do
clear
echo "************************"
echo "* My website loader    *"
echo "************************"
echo "* [1] Facebook         *"
echo "* [2] Google           *"
echo "* [3] Twitter          *"
echo "* [4] Youtube          *"
echo "* [5] Some other site  *"
echo "*                      *"
echo "* [0] Exit/Stop        *"
echo "************************"
echo -n "Enter your menu choice [1-5, or 0]: "
read yourch
case $yourch in
1)  firefox http://www.facebook.com & ;;
2)  firefox http://www.google.com & ;;
3)  firefox http://www.twitter.com & ;;
4)  firefox http://www.youtube.com & ;;
5) echo  ; read -p "Enter website: " ws ; firefox $ws & ;;
0) exit 0;;
*) echo "Oopps!!! Please select choice 1,2,3, 4 or 5";
echo "Press Enter to continue. . ." ; read ;;
esac
done

Which generates a screen something like this.
************************
* My website loader    *
************************
* [1] Facebook         *
* [2] Google           *
* [3] Twitter          *
* [4] Youtube          *
* [5] Some other site  *
*                      *
* [0] Exit/Stop        *
************************
Enter your menu choice [1-5, or 0]: 

——————————————————–

The original teleprompter setup was a bit bulky, but works best for me. Decided to come up with a simpler setup that only required one reflector.

But with this unit you need to have reversed text displayed. No problem.

Create text in OfficeWriter.
Export text to a pdf file i.e. test.pdf

Get software.
$ sudo apt-get pdfjam
Reverse the pdf facing.
$ pdffip test.pdf
which generates test-flipped.pdf.

Show the file in your document viewer and do your video.
You will probably have more text that what I used.

——————————————————–

Got milk?

SUNP0006

Good day.

Advertisements