Friday, March 11, 2011

Old-Me vs New-Me

Dear Blog,

At work, doing my thing, and I decided to look at myself a year ago and today. Well, I'm on my way to having long hair again (but probably chop it off way before I get close). I still get scruffly faced (beard-wise). I seem to be more outgoing last year vs today, but that's OK. I'm being a programmer this year anyway. I am planting a new batch of vegetables and herbs, like last year. I still want to do outstanding things, but still focusing on the WHAT and not the HOW. I am employed today vs unemployed at this time last year. Not worried about money, or making money now, as it streams in as long as I give my 8 hours of the day.

The rest of this entry will be about motivation. I am, at this very moment, unmotivated, to do the things I want, and in my head, NEED. But why? Is simply wanting something not motivation enough to get your goals done. I say yes! Wanting something gives you a destination, but without anyway to get there, do you really even think about it?

For example, I want to be in Hawaii right now (b/c the beach sure sounds better than being in my office all day). But since there is no feasible way for me to be there this instant, I forget about it.

Another example, I wanted to lose like 30 lbs like 5 years ago. I'm still working on it! In that time, if I lost 1/2 a pound each month, I would have been at my goal right now! No hard workouts, not even a drastic life change. Just simply one less serving of junk a week could have got me that! But without direction or schedule available, wanting it now does not always fit the bill.

So what's going to get me motivated? This delicious chocolate on my desk will definitely make me happy now, but that's a step backwards from my weightloss goals. Playing videogames 3 hours a day is soo fun, but another step backwards in making videogames. The darn push and pull of life gets in the way of what I want! I want it all! I want to eat chocolate, play games, make games, lose weight, do work, goof off, and somehow get it done before I go to sleep today! (opening chocolate now... : P )

MMmmm, soo good.... Oh well, let's just say I just decided to screw up my 1/2 lb this month.

What's important to you? Enjoying the moment? Getting goals done? Achieving greatness? If you said all this and more, you are parallel to my world. I say the same things. Why sacrifice, when you CAN have it all? Eat that chocolate now, and hurry up and get your mind on something else before you eat 5 more. Play videogames here and there, but get off before you get sucked into beating yourself. Make videogames, create a schedule, have goals, do it ALL! You can do it! I can do it! Let's forget the bad, and just focus on what we can do now to maximize our value of life.

That chocolate was damn good!

- ETdoFresh

Sunday, February 20, 2011

Git on Windows (Cygwin and Git Extensions)

Dear Blog,

Setting up git (Version Control System) really did suck on Windows. It wasn't a simple install this package, and all your problems are solved. I had major issues trying to use PuTTy, plink, and copSSH, which I believe most people use if they are using git on windows. I'm doing the cygwin approach. It's soo much easier (to me at least). Setting up the server kind of sucks, but the client is easy. I'll show how to setup the client today, and put up another post very shortly on how to setup a git server on windows using these exact same files.

Step 1 - Download and install Cygwin

Download cygwin from http://www.cygwin.com/ (Even Quicker Link)

  • Run setup.exe
  • Click Next >
  • Select Install from Internet. Click Next >
  • Keep Root Directory C:\cygwin, and Select All Users (RECOMMENDED). Click Next >
  • Personally, I change Local Package Directory to C:\cygwin\packages. But wherever is fine.
  • Select Direct Connection, Click Next >
  • Select a mirror (I use http://mirror.cs.vt.edu), Click Next >
  • Should get a Setup Alert, Click OK
  • Select All > Devel > git. Select All > Net > openssh. Click Next >
  • Make sure Select required packages is checked, Click Next >
  • Let it download and install
  • Click Finish
  • Run it once. You should get a unix command prompt. Type in git<enter>, and you should see a list of options. Type in ssh<enter>, and you should also get a list of options.
  • If all looks alright, you are done with Cygwin (if you are just using this as a client)

Step 2 - Download and install Git Extensions

Download gitextensions MSI file from http://code.google.com/p/gitextensions/ (Even Quicker Link)

  • Run msi installer
  • Click Next
  • Verify path is OK for you. Click Next
  • Leave default options if you want, Click Next
  • Select OpenSSH, Click Next
  • Click Install
  • Let it install
  • Click Finish
  • Note: If you are prompted to install msysgit and kdiff3, just install kdiff3... otherwise download and install kdiff3 (or whatever diff software you like)

Step 3 - Setup Git Extensions

  • Run Git Extensions
  • Select English (if you perfer) - The UK flag!
  • In settings (which should pop up right away) Select the Git tab
    • Set command used to run git as C:\cygwin\bin\git.exe
    • Set Path to linux tools as C:\cygwin\bin
  • Select Global settings
    • Set perferred username and user email
  • Select Ssh
    • Ensure OpenSSH is selected

Step 4 - Use Git

  • Click Clone repository
  • For Repository to clone, type in your server or directory (ie ssh://username@my.server.com/git/test.git)
  • Set Destination and subdirectory appropriately. Click Clone.
  • Log into your SSH server.
  • Click OK on success (I hope!)
  • Click Yes to view your repository.
  • You will only have to log into your SSH on every push (not for every commit)
  • Now get to work!

So, I know the issues I ran into using the putty, plink, msysgit may not be normal. But it definitely was a problem for me. So, here is my how-to on Cygwin and Git Extension, and I love this setup. I'll get to that server how-to in the next couple of days. Later!

- ETdoFresh

Friday, January 28, 2011

Corona Simulator shortcut

Dear Blog,

I decided that I am going to use Ansca Corona to develop a game I'm working on vs. Airplay SDK. This LUA language is soo much easier than C++. I still would love to have my games programmed in C++, but for just me, it'll take too long to get to my final destination. So, LUA it is! Anyway, here is a quick batch file that I like to keep in my projects directory so all I have to do is drag the folder to this batch file, or type in the name of the porject I'm working on.

simulate.cmd

@echo off
echo -------------------------
echo Shortcut to LUA Simulator
echo -------------------------
echo.

SET coronaSimulator=%ProgramFiles(x86)%
IF "%coronaSimulator%" == "" SET coronaSimulator=%ProgramFiles%
SET coronaSimulator=%coronaSimulator%\Ansca\Corona Simulator\Corona 

Simulator.exe

IF NOT [%1] == [] GOTO PROCEED
SET /P simulateTarget=Enter name of your project? 

:PROCEED
IF NOT [%simulateTarget%] == [] SET simulateTarget="%simulateTarget%"
SET simulateTarget=%1%simulateTarget%\main.lua

IF NOT EXIST %simulateTarget% GOTO MESSAGE
start "Corona Simulator" "%coronaSimulator%" %simulateTarget%
GOTO END

:MESSAGE
echo Project does not exist: %simulateTarget%
pause

:END

Sunday, December 19, 2010

Symbolic Link Batch File

Dear Blog,

I use Boxee, and when I download DVDs, they don't show up as episodes on my TV Guide. Someone suggested making symbolic links... Sounds good to me. Here's a batch file I use to generate these symbolic links (not catching me renaming 100's of files

@echo off
SETLOCAL EnableDelayedExpansion
echo -------------------------------------------------------------------------
echo  This will make symbolic links for your ISO/IMG files
echo -------------------------------------------------------------------------
echo.

IF "%~f1" == "" (
  echo No file dragged onto this script
  pause
  EXIT
)

SET /P season=Season (ie 1)? 
SET /P episodeStart=Starting Episode (ie 1)? 
SET /P episodeEnd=Ending Episode (ie 4)?

IF NOT DEFINED season SET season=1
IF NOT DEFINED episodeStart SET episodeStart=1
IF NOT DEFINED episodeEnd SET episodeEnd=4

IF %season% LSS 10 SET season=0%season%
IF %episodeStart% LSS 10 SET episodeStartZero=0%episodeStart%

SET firstEpisode=%~n1 S%season%E%episodeStartZero%%~x1
MOVE "%~dpf1" "%~dp1%firstEpisode%"

IF %episodeStart% GEQ %episodeEnd% EXIT
SET /A episodeStart=episodeStart + 1

FOR /l %%n IN (%episodeStart%,1,%episodeEnd%) DO (
  SET currentEpisode=%%n
  IF !currentEpisode! LSS 10 SET currentEpisode=0!currentEpisode!
  mklink "%~dpn1 S%season%E!currentEpisode!%~x1" "%firstEpisode%"
)
pause

Edit: Hmm, my sickbeard renames the files, so here is my newer method... I append each dvd with their first episode, like first dvd would now end in s01e01. Do that for each dvd. Then sickbeard renames it. To show up nicely in boxee, I run the following, slighltly modified script:

@echo off
SETLOCAL EnableDelayedExpansion
echo -------------------------------------------------------------------------
echo  This will make symbolic links for your ISO/IMG files
echo -------------------------------------------------------------------------
echo.

IF "%~f1" == "" (
  echo No file dragged onto this script
  pause
  EXIT
)

SET /P season=Season (ie 1)? 
SET /P episodeStart=Starting Episode (ie 2)? 
SET /P episodeEnd=Ending Episode (ie 4)?

IF NOT DEFINED season SET season=1
IF NOT DEFINED episodeStart SET episodeStart=2
IF NOT DEFINED episodeEnd SET episodeEnd=4

IF %season% LSS 10 SET season=0%season%

FOR /l %%n IN (%episodeStart%,1,%episodeEnd%) DO (
  SET currentEpisode=%%n
  IF !currentEpisode! LSS 10 SET currentEpisode=0!currentEpisode!
  mklink "%~dp1S%season%E!currentEpisode!%~x1" "%~f1"
)
pause

Thursday, December 16, 2010

Enable Sound Controls (Mute) in Media Center 7 (7MC)

Dear Blog

Tonight I was having issues muting my HD content. My normal SD conent has normal, vol up/down and mute capabilities. Unfortunately, my HD conent was always like near max blast, even if I hit mute or vol down.

So what I did was turn on Auto Volume! It works now... no dolby digital sound from the TV anymore, but, I only use TV speakers anyway, so I'm not missing much.

I believe it's in:
Settings > TV > Audio > Auto Volume Checkbox

- ETdoFresh

Tuesday, December 7, 2010

Merge PDFs using Ghost Script (CutePDF)

Dear Blog,

Here is a batch file (.cmd or .bat) to merge PDFs

@echo off
echo -------------------------------------------------------------------------
echo  This will merge all your pdfs in the current directory to an output.pdf
echo -------------------------------------------------------------------------
echo.
Setlocal EnableDelayedExpansion
%~d0
cd %~p0
set /p MERGEFILE=Output file (no need to add .pdf)? 
set PDFMERGE=
for %%f in (*.pdf) do set PDFMERGE=!PDFMERGE! "%%f"
"C:\Program Files\GPLGS\gswin32c" -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -sOutputFile="%MERGEFILE%.pdf" %PDFMERGE%
pause

Friday, May 28, 2010

Palm Pre (Plastic) Scratched Up

Dear Blog,

After playing some volleyball and using my phone, I realized sand + my thumb = deep scratches on my phone. Now when I use my phone, I could feel the scratches and it made me cringe...

Well I decided to buy some plastic repair off ebay called Novus plastic scratch repair kit. It came in 1, 2, 3 bottles, where 1 was just a polish, 2 was a shallow scractch repair, and 3 was the heavy duty scratch repair.

I picked up my phone, did number 2 like 2 - 3 times, and I finished off with a number 1. Looked much better, but the scratches are still there if you look at it in the right light. But the "feeling" is completely smooth. Soo happy I did this! If you have a scracthed pre, or anything that's plastic. Try this out. I think it was about $10 after shipping. Worth it, for me!

- ET