Sunday, May 10, 2015

Speedrunning The Legend of Zelda

My hobby for the last few months has been watching Twitch streamers stream speed runs of Zelda (the original Zelda), and also taking a stab (no pun intended) at speed running myself.  It took me a long time to finally get my VCR-taped speed runs of Zelda in a digital format, but here it is:


(https://www.youtube.com/watch?v=WqcHvzwj9Uk)

That is a video of my 38:36 which was a former PB (personal best).  I PB'd last night, at 38:30, but I don't have that video on youtube yet.  I've been doing commentary of my PB runs too, so I'll try to get that uploaded too.

The leaderboard is here: https://www.zeldaspeedruns.com/leaderboards/loz/1st-quest

Saturday, April 25, 2015

How to download iPhone Voice Memos to your computer

I was trying to copy an iPhone voice memo to my Windows 7 computer today.  I literally tried for hours using iTunes, which I've successfully done before (with some effort).  I couldn't get it working today.  Instead, I tried a freeware utility called iFunbox, and it worked great.  Download it here:

http://www.i-funbox.com/en_download.html

There's also a MacOS version.

Once iFunbox is downloaded and installed, choose the "File Browser" tab at the top, and expand the "Voice Memos" option.  If there are no voice memos, then try going into iTunes, plug in your iPhone to your computer, choose the phone icon (after the music note, movie, TV show, and ellipsis icon at the top), and choose "Settings" | "Music", and make sure that "Include voice memos" is checked.  Then run iFunbox.

Wednesday, April 8, 2015

How to Install LiveSplit on 64-bit Fedora 20 Linux

1) Download the latest LiveSplit from here: http://livesplit.org/downloads/

2) install wine:

yum install wine

3) Download winetricks

wget http://winetricks.org/winetricks
chmod a+x winetricks

4) Setup a 32-bit wine prefix:

sudo su
export WINEARCH="win32"
export WINEPREFIX=~/.wine-PROGRAM-NAME/
wineboot -u

5) sudo su
winetricks dotnet40

6) unzip LiveSplit_1.5.5.zip

6) Run LiveSplit

sudo su
wine ./LiveSplit.exe

Thursday, March 26, 2015

How to compile qemu for RHEL 6

1) Download, compile, and install SDL-1.2.15

2) Download qemu-2.2.1.  Configure like this:
./configure --enable-cdl

3) /path/to/bin/qemu-system-x86_64 -m 4096 /path/to/HardDriveImage.qcow2

4096 is the amount of memory you want to use, in MB.

If your hard drive image is from VirtualBox, http://cheznick.net/main/content/converting-a-virtual-machine-from-virtualbox-to-kvm explains how to convert the hard drive image to either a raw .img file or a qcow2 file:

1) VboxManage clonehd /path/to/hardDriveImage.vdi hardDriveImage.img --format raw
2) qemu-img convert -f raw hardDriveImage.img -O qcow2 hardDriveImage.qcow2

Sunday, March 22, 2015

How to permanently show the Bookmarks Toolbar in Firefox

Right click on the tab area (right under the window title bar), and check the "Bookmarks Toolbar" option.

Enabling that feature was kind of hard to find for some reason...

Friday, March 20, 2015

How to force a Solr 5.0.0 field/column to be a certain type

Solr 5 uses a managed schema by default, while Solr 4 used the schema.xml file.  Solr 5 automatically creates the schema for you by guessing the type of the field.  Once the type is assigned to the field, you can't change it.  You have to set the type of the field before you add data to Solr 5.

To change the schema in Solr 5, you will want to use the Schema API, which is a REST interface. Go to https://cwiki.apache.org/confluence/display/solr/Schema+API

https://cwiki.apache.org/confluence/display/solr/Schemaless+Mode describes a little bit about the Schemaless Mode (i.e. managed schema).  That page states the following:

"You Can Still Be Explicit - Even if you want to use schemaless mode for most fields, you can still use the Schema API to pre-emptively create some fields, with explicit types, before you index documents that use them. ... Once a field has been added to the schema, its field type is fixed."

If you are using the quick start guide for Solr 5, here's what you have to do if you want to explicitly specify the field types:

After you enter the following command:

bin/solr start -e cloud -noprompt

Then enter a command like this:

curl -X POST -H 'Content-type:application/json' --data-binary '{    "add-field" : {        "name":"MYFIELDNAMEHERE",        "type":"tlong",        "stored":true}}' http://localhost:8983/solr/gettingstarted/schema

The previous command will force the MYFIELDNAMEHERE field to be a tlong.  Replace MYFIELDNAMEHERE with the field name that you want to be explicitly set, and change tlong to the Solr type that you want to use.

After doing that, then load your data as usual.

Tuesday, March 17, 2015

How to install Windows 98 without using a floppy disk drive

If you're reading this... no you didn't go back in time 15+ years.

I had to install Windows 98 to one of my computers, because my video capture card only has drivers for Windows 95 and Windows 98.  It had been so long since I've installed Windows 98, I forgot that the Windows 98 installation CD is not bootable.  I didn't think I had a floppy disk (even though that computer had a floppy disk drive), so here's how I installed Windows 98 instead:

1) Download Knoppix (http://www.knopper.net/knoppix/index-en.html) and create a Knoppix CD

2) Create a Windows 98 boot CD from here: https://staff.washington.edu/curreri/windows-98-boot-cd-download-this-iso/

3) Boot my computer to the Windows 98 boot CD, repartition and format your hard drive to FAT32.  Use the format /s switch to copy the system files to the c drive.

4) If you only have 1 CD drive, boot to Knoppix, and copy the Windows 98 installation CD to the "C drive", which was mounted at /mnt/sda1 or /dev/sda1 for me.  You can use scp to copy the Windows 98 installation CD to your "C drive".  If you have 2 CD drives, you can skip the Knoppix step, and just change to the R or S drive (which should be the other CD drive) on steps 7 and 7.

5) Boot to the Windows 98 boot CD if you currently have Knoppix up.

6) Change to C drive by typing in "c:" at the DOS prompt (or change to the R or S drive)

7) Run the setup.exe Windows 98 install program

Tuesday, March 10, 2015

How to get multiple distributed shards working on Solr 5.0.0


Here's how to get distributed querying working with shards with Solr 5.0.0
  1. Go through http://lucene.apache.org/solr/quickstart.html (see my blog here for hints http://muddyazian.blogspot.com/2015/03/how-to-get-solr-500-quick-start.html)
     
  2. If you follow the quickstart, 2 shards are created on (i) port 8983 and (ii) port 7574.  Two replicas are also created, but the important thing to note is that port 8983 has one shard, and 7574 has the other shard.

    The data are automatically routed to either the 8983 shard or the 7574 shard when importing.
     
  3. A query like

    http://localhost:8983/solr/gettingstarted/select?q=*:*

    will query on both shards, and merge the results together
     
  4. If you only want results from one shard, then form the query like this:

    http://localhost:8983/solr/gettingstarted/select?q=*:*&shards=localhost:7574/solr/gettingstarted

    (Note: that you need the /gettingstarted at the end of the URL, which is something missing from the instructions at https://cwiki.apache.org/confluence/display/solr/Distributed+Requests)

Information pieced together from:

How to expand all trees Emacs and org mode

Usually, you expand a subtree by pressing TAB.  To expand the whole document, press:

Ctrl-u Ctrl-u Ctrl-u TAB

Friday, March 6, 2015

How to get solr 5.0.0 quick start tutorial working on Fedora linux

As of today, the current version of Solr is 5.0.0, and the quick start guide is here:

http://lucene.apache.org/solr/quickstart.html

When running:

$ bin/solr start -e cloud -noprompt

If you are getting the following error message:

WARN  - 2015-03-06 16:02:05.519; org.apache.solr.util.SolrCLI; Request to http://134.252.99.99:7574/solr/admin/collections?action=list failed due to: Connection timed out, sleeping for 5 seconds before re-trying the request ...

It's likely because your router or firewall is blocking connections to your own machine to port 7574 when using the IP address.

Here's a workaround:

Edit the /etc/hosts file and put in the following line:

134.252.99.99 localhost

(replace 134.252.99.99 with your IP address)

Your OS will know that 134.252.99.99 is localhost, and will bypass the router.

Now, when you go to http://localhost:8983/solr/#/~cloud you should see this diagram:


Note: 134.252.99.99 is not my IP address.  It's supposed to be a "dummy" IP address.  Apologies if that is your IP address.

How to get VNC server (vncserver) working with Fedora via yum

$ sudo yum install tigervnc-server
$ vncserver

On the client machine, download a vnc client (such as Tight VNC), and put in the following server IP address:

server.ip.address:5901

Tuesday, March 3, 2015

How to install VirtualBox .rpm on Fedora 16

No guarantees here, because there's a "rpm -i --force" involved...

wget ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora/linux/releases/17/Everything/x86_64/os/Packages/l/libpng-1.5.10-1.fc17.x86_64.rpm

sudo rpm -i --force libpng-1.5.10-1.fc17.x86_64.rpm

wget http://download.virtualbox.org/virtualbox/4.3.24/VirtualBox-4.3-4.3.24_98716_fedora17-1.x86_64.rpm

rpm -i VirtualBox-4.3-4.3.24_98716_fedora17-1.x86_64.rpm

After that, add yourself to the vboxusers group  (in /etc/group)

Tuesday, February 17, 2015

Getting Networking to Work with VirtualBox and CentOS

Why isn't my network working when I've installed CentOS 6 on VirtualBox?  Try to do this:

1) Edit the /etc/sysconfig/network-scripts/ifcg-eth0 file

2) Change

ONBOOT=no

to

ONBOOT=yes

3) Reboot the VM

Networking should work after that.