ianneubert.com

Archive for the ‘Computers’ Category

Quickly convert Mountain Lion DMG into an ISO file

Tuesday, October 2nd, 2012

From the terminal, after downloading Mountain Lion from the App store:
hdiutil makehybrid -iso -hfs /Applications/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport/InstallESD.dmg -o OSX-10.8.iso

Create a self-signed SSL certificate with openssl in PKCS#12 format

Monday, August 27th, 2012

Here is a quick way to create a self-signed SSL certificate with openssl and output the key/cert into PKCS#12 format. I’ve found that I’ve had to do this several times at work to get a certificate ready for a Windows machine. I got tired of looking up the procedure each time, so here goes…

# create the private key
openssl genrsa -out server.key 2048

# create a new csr
openssl req -new -key server.key -out server.csr

# sign the csr into a PEM cert file
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

# convert the PEM cert and key into a PKCS#12 file
openssl pkcs12 -export -out server.pfx -inkey server.key -in server.crt

Possibly Fix a status error 19 code on a Mitsubishi LaserVue L65-A90 TV

Thursday, August 2nd, 2012

After coming back from vacation my Mitsubishi LaserVue L65-A90 TV would not start. It had a solid red LED status indicator and would not turn on.

After talking to a local technician he gave me the following steps to try:

On the TV press and hold the Menu and Input buttons for 5 seconds.

This will trigger the system to report an error code using the power LED light. It blinked once, then paused, then blinked 9 times, indicating error code 19.

He said this error code indicated that the “receiver was locked”.

He then had me do the following to unlock and restart it:

Hold Menu and Channel Up for 5 seconds. Status light turns to green for 3 seconds. Then, hold Menu and Channel Down for 5 seconds.

Seemed a lot like resetting the CMOS on a computer to me.

After that the TV is working perfectly fine! Although, he said it may not work in all cases.

Big thank you to Ultimate Audio Video in Laguna Hills, CA! They helped me fix my TV over the phone for free!

Quickly convert files to Unix or Windows line endings

Thursday, April 26th, 2012

Here is a quick script that will convert all js file line endings in a folder from either Windows or Unix into Unix line endings:
find . -type f -name '*.js' -print0 | xargs -0 perl -pi -e 's/(\n|\r\n?)/\n/'

And here is the same script to convert them into Windows line endings:
find . -type f -name '*.js' -print0 | xargs -0 perl -pi -e 's/(\n|\r\n?)/\r\n/'

VMWare Workstation left mouse stops responding

Wednesday, June 29th, 2011

For the last couple days I’ve had a problem with VMWare Workstation v.7.1.4 build-385536 where my left mouse click suddenly stopped working in my Windows 2008 guest VM.

I finally found the problem!

When dragging and dropping text inside the guest VM I was dragging outside the VMWare container. This is what caused the problem.

To fix it so that never happens again I’ve disabled the ability to Drag & Drop from the guest. You can set this in your virtual machine settings, under Options > “Guest Isolation”.

 

Add “I’m Feeling Lucky” keyboard shortcut to Chrome

Friday, May 13th, 2011

I often will search Google for a keyword that I know will return the result I want in the first spot. Until now I was using Chrome to search for the keyword and then clicking on the link to go to the page.

There must be a better way!

There is!

Setup a custom search engine in Chrome like this:

  1. Click the wrench icon
  2. Click on Preferences
  3. Click on Manage Search Engines
  4. Scroll to the bottom
  5. Add a new search engine with these fields:
    1. Google Instant
    2. !
    3. http://www.google.com/search?q=%s&btnI=Im+Feeling+Lucky

Bam!

Now you can do an I’m Feeling Lucky search just by hitting the exclamation point, a space, and then the keyword. Like this:

! ruby arrays

Windows 7 Drag & Drop Stops Working

Tuesday, April 19th, 2011

I’ve found that in Windows 7 sometimes I will randomly be unable to drag and drop files from the explorer shell.

If you ever have that problem try this to fix it:

  1. Press Ctrl+Alt+Del.
  2. Press Esc.

This worked great for me. Your results may vary!

By the way: Thanks Microsoft for yet another reason to use a Mac instead of a PC.

Source: superuser.com

Remote Desktop Connection: Copy and Paste Stopped Working?

Tuesday, February 1st, 2011

I have been using Remote Desktop Connection on my Mac to connect to my new Windows 7 PC for the last couple weeks. Ever run into a problem where your RDP connection stops sharing copy and paste with your Mac?

It was driving me nuts, but thanks to this website I was able to finally find the answer:

  1. Open task manager on the PC
  2. Kill the rdpclip.exe process
  3. Run the program rdpclip.exe from the CLI or close and reconnect the RDP session.

Update: After the break is a script that will automatically kill and restart rdpclip.exe.
(more…)

How to sync music from iTunes on Mac to a PC

Thursday, January 13th, 2011

Here is an rsync command that will synchronize music stored in a Mac to a PC. It will not sync Movies or TV Shows. Just remove the –excludes if you want to sync those things.

rsync -av --force --delete --stats --size-only -e ssh --exclude="ethumbs_vista.db" --exclude="Thumbs.db" --exclude=".DS_Store" --exclude="iTunes\ Library.xml" --exclude="Mobile\ Applications/*" --exclude="Movies/*" --exclude="TV\ Shows/*" ~/Music/iTunes/* /Volumes/itunes

Thanks to MacRumors for the base of this command.

Use SSH to get tail of log file

Wednesday, July 14th, 2010

Ever wanted to take the last 1000 lines of a log file from your remote server and then copy that to your local machine to use in a nicer text editor?

Now you can! This single command will grab the last X lines from a remote file, remove any ANSI color codes, and then compress the output right on to your local computer.

Just replace the green text with your information and you’re all set.

ssh username@my.server.com "tail -n 3000 /var/log/mylogfile.log | sed -r 's/\x1B\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g' | bzip2" > /my/local/file.log.bz2

The log will be trimmed, cleaned, and compressed all on the remote server before transport.