• Home
  • Shell
    • Emacs
    • Perl
    • screen
    • sed
  • Ubuntu
    • VNC
  • Web Development
    • Javascript
    • Joomla
    • MySQL
    • osTicket
  • Windows
    • Gimp

Posts tagged Windows

AWK> Useful examples

May26
2011
Written by Scott Rowley

Just a starter page that will grow as I find useful awk commands to share.

Convert Linux .txt to Windows .txt
Replace the end of a line with a carriage. Useful for converting .txt files from Linux to Windows.

awk 'sub("$", "\r")' linuxfile.txt > windowsfile.txt

Convert Windows .txt to Linux .txt
And the reverse. Useful for converting .txt files from Windows to Linux.

awk '{ sub("\r$", ""); print }' windowsfile.txt> linuxfile.txt
Posted in BASH - Tagged awk, convert, example, linux, list, sub, txt

HTPC> Setup Windows 7 as a Media Center with XBMC

May22
2011
Written by Scott Rowley

The following is an article I came up with after setting up my HTPC with XBMC for the 2nd time. I originally had Boxee on it and I do like Boxee — but I just don’t use the online content that much and XBMC is slightly more customization friendly. At any rate — this is what I’ve come up with. If you find it useful, have questions or comments please leave me a message in the comments below the article.

 

Assumptions: You have Windows 7 installed on a desktop PC.

Download & Install XBMC — http://xbmc.org/download/

Setup XBMC to see your Media

Videos> Add source> Browse> Find & Select Folder containing your Movies
– If you have additional locations click the Add button and then Browse to locate
– Repeat for as many locations as necessary
Once you have all of your Movie paths entered you can navigate down to the bottom and change the name, I recommend “Movies”.
Click OK
Select a “Scraper” to retrieve movie information — For movies you will want to select (Movies) themoviedb.org.
Click OK
Repeat the same steps for TV, selecting the appropriate scraper for TV.
Videos> Highlight “Movies”> Hit “C” and select the “Scan for new content”.
Wait for it to finish adding content then repeat for any other media you added, such as “TV”.

Once you have content you can now change how your Skin looks — I prefer to have “Videos” replaced by “Movies” and “TV Shows”
System> Skin>
– Select “Hide — Videos”
– Deselect “Hide — Movies” and “Hide — TV shows”
– Show/Hide anything else you want to.

Now we’ve got our basic setup completed. If you want a simple setup that you can turn on manually and watch movies/tv you can stop here. If you want a HTPC that will power itself off at night,
turn itself on in the morning, boot straight into XBMC, and can be controlled by your phone — then the rest of this tutorial is for you.

READ MORE »

Tagged advancedsettings.xml, auto, automatic, bios, boot, control, fullscreen, htpc, movie, music, power, remote, schedule, scheduler, task, television, tv, video, windows 7, xbmc, xmbc

Windows> Batch convert video with Handbrake

May13
2011
Written by Scott Rowley

The following code is setup for use with a Nook Color, but you could change the resolution for use with other devices as well. If you have any that you find work well for you please post them in the comments and I will extend the article.

First off, if you don’t already have it you obviously need Handbrake

Thanks to RedShirt for the original code.
handbrake_nook.bat

:: http://www.sudobash.net?p=594
:: Nook Color
@echo off
FOR /F "tokens=*" %%G IN ('DIR "%~1" /B /S /A:-d') do (
FOR /F "tokens=*" %%H IN ('DIR "%%G" /B /A:-d') do (
:: This assumes you have the default install location on Windows 7.
"C:\Program Files (x86)\Handbrake\HandBrakeCLI" -e x264 -2 -b 702 -a 1 -E faac -B 48 -6 mono -R Auto -D 0.0 -f mp4 -I -X 854 -m -x level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0 -D 1.5 -i "%%G" -o "C:\Users\YOUR_LOGIN_NAME\Videos\transcode\%%H-NOOK.mp4"
)
)

handbrake_kfire.bat

:: http://www.sudobash.net?p=594
:: Kindle Fire
@echo off
FOR /F "tokens=*" %%G IN ('DIR "%~1" /B /S /A:-d') do (
FOR /F "tokens=*" %%H IN ('DIR "%%G" /B /A:-d') do (
:: This assumes you have the default install location on Windows 7.
"C:\Program Files (x86)\Handbrake\HandBrakeCLI" -e x264 -2 -b 702 -a 1 -E faac -B 48 -6 mono -R Auto -D 0.0 -f mp4 -I -X 1024 -m -x level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0 -D 1.5 -i "%%G" -o "C:\Users\YOUR_LOGIN_NAME\Videos\transcode\%%H-FIRE.mp4"
)
)

Make sure the entire command is all on one line with no line breaks or wrapping or this will not work. Don’t forget to change your destination directory to reflect your own login name. Also make sure that the entire destination path exists (by creating the “transcode” directory). Don’t worry about “Videos”, Windows sees that the same as “My Videos”.

Note: This code references the (x86) Program Files. If you are not running 64 bit then this will not be an accurate location:
Untested — Remove ” (x86)” for use on non 64-bit Windows

Now, you can either place the batch file wherever you like and then run it from the command line like so:
handbrake_nook.bat

Or you can run the bat file right from the same directory the video files are in and supply no directory, such as:
handbrake_nook.bat

To Do: Have a nightly check to see if there are any files in the selected directory. If so — convert them and then move the originals to another folder.

Tagged bat, batch, color, convert, handbrake, kindle, kindle fire, mobile, nook, transcode

Windows> Add Windows 7 Snap feature to XP

Oct28
2010
Written by Scott Rowley

Check out the following software for an excellent version of Windows 7 snap for your Windows 2000, XP, Vista and even improve on a Windows 7 box.

http://www.nurgo-software.com/products/aquasnap
Tagged 7, aero, aqua, nurgo, snap

Windows> Save & Restore icon locations

Oct27
2010
Written by Scott Rowley

If you are like me and need to remote desktop into your work PC (or any PC) you may run into the problem of all your icons being rearranged as you change resolutions. I especially run into the problem as I remote in from my laptop into my desktop that has dual monitors. I recently found and tested the following software and so far its working great for me:

Desktop Restore

All you need do is:

1. Install the software (takes seconds)
2. Arrange the icons the way you want them
3. Right click on your desktop

4. Select save

Now after you have remoted in to your desktop and then logged back out, when you get back to your desktop just right click and select “Restore Desktop” and instantly your icons are back to their saved locations.

From “ah what the hell?!”

To glorious organization restored.

Tagged grid, icon, locations, restore, save, software

Corrections? Questions? Comments?

Find an error?
Everything work out great for you?
Have some feedback?
Like to see something added to the article?

PLEASE leave us a comment after the article and let us know how we are doing, or if something needs corrected, improved or clarified.

Thank you!
- The Management

Advertisement

Sudo Bash
By Geeks - For Geeks

Back to Top