Turbolinks and Vue: JavaScript Managing Memory

Turbolinks is a tool that is included in Rails project that renders each page change without actually changing the page in the browser. This helps to make the browsing feel faster and causes less flashing as you change pages.

Vue.js is a JavaScript framework to help build a user interface.

You could probably just impelment them together and forget about it, but I had a concern about memory leaks. As you move from page to page, normal page browsing destroys anything you’ve stored in a variable in JavaScript, but Turbolinks prevents the browser from deleting any variables (and usually, if you load a library such as jQuery, destroying and parsing the code takes time that is unnecessary). There is a lack of documentation on how to make these 2 libraries work together, and most places just say “disable Turbolinks in order to use Vue.js”.

I’m not sure that this is complete, but it’s probably better than nothing. My JavaScript solution is as follows:

(function() {
  var vue;
  $(document).on("turbolinks:visit", function() {
    // If the instance exists, destroy
    if (vue) vue.$destroy();
    vue = null;

  $(document).on("turbolinks:load", function() {
    el = $("#myVue");
    if (el.length === 0) return
    vue = new Vue({
      el: el[0],
      data: {},
      // ...

If you have comments or tips on how to improve this, leave me a comment!


Oracle VM Review

I’ve been tasked with the job of setting up a VM system at work, and Oracle VM was selected because it had the features we needed for free. I started a few weeks ago, trying to get it installed and configured, and I’ve finally got a working system using Oracle 3.0.2.

Oracle forums went down 3 days ago, and has not come back up. This is a computer company that has important server software that should be known for it’s reliability, and they can’t even keep their websites reliable.


I currently only have 2 physical servers that are the VM hosts, and we’re running the manager on a VMWare server (seems ironic, doesn’t it). The hosts both have 2 Intel Xeon Quad-Core 2.4Ghz processors, with 32 GB of memory. We don’t have external storage as of yet, but will probably be moving to that in the future.


The installation was fairly easy, when following the instructions, but was not well explained in the installation interface. I downloaded the ISO’s for the VM hosts and the VM Manager. I downloaded 3.0.1 at first, which would not discover local file systems, though it was available in the interface. After a few days, 3.0.2 was available, so I downloaded it and it worked with local file systems.

I have had to reinstall a few times to make some changes, such as using VLAN’s for bond0 (otherwise, eth0 is limited to that network, without VLAN support). I will talk about networking issues later though.


This is where things started getting frustrating. When I installed 3.0.1, I set up NFS on the VM hosts machines, but when I would start to partition a drive on one of the guests, both of the machines would reboot without telling me why. I was told in the forums, before they went down, that it’s because the storage transfer was interfering with the heartbeats to keep the servers alive.

Using 3.0.2, I was able to use local storage. It works better, but I don’t think I can transfer VM’s, as each host can only see the local storage on itself, not the other hosts.


My system’s have 2 NICs on them currently.

The first problem I had was that I installed the system with bond0 having my management address. When I wanted to add a VLAN, it wouldn’t let me without tying it to a physical port on one of the servers (why it needs a physical port, I’m not sure). So I reinstalled the system with a tagged VLAN.

The default mode for bond0 is “Active Backup”. I would like to change it to “Dynamic Aggregation”, but it says I can’t change bonding mode on a management interface.

I also can’t create a bond with only one interface. This is a restriction set on by the management, but in Linux, it is perfectly acceptable to have a bond with a single interface.

Server Management

Creating a pool and adding servers is not too bad. It was as simple as following the instructions.

Removing a server pool is a little more difficult though. The interface would throw random errors at me when I would attempt to remove the master server from the pool. The worst problem with the interface is decoding the error messages, and figuring out the exact steps to get something as simple as deleting a Server Pool. I finally got it to work once by removing all VM guests, removing all repository content, and then the repositories themselves, removing the VM hosts, and then finally removing the server pool. I think I was not removing the repository originally.


Without reading the document, you don’t realize that they require that you install tightvnc on the server, or set up the local path. It errors out saying “cannot connect”. It also requires me to download, and open the file every time, which may be Google Chrome’s fault, but there should be an easier way to do this. An embedded Java applet would work, since they are using Java to begin with.


Overall, the system has some good things about it, but a major problem is the interface. Instead of having an interface that is intuitive, I have to read a 250 page document to figure out simple tasks. I can’t change the management interface, which could be done by adding a console program to Oracle VM operating system, but instead, I’m limited to doing what they allow me to do.


From Ubuntu to Fedora

I’ve had a Linux machine (sometimes 2 or 3), for the past 7 years. I used Mandriva, but then moved to Redhat, which later became Fedora. I used Fedora for 3 or 4 years, but then went with Ubuntu because of it’s willingness to include the ability to have non-open-source drivers and libraries (mp3) without a hassle.

During the most recent update, I tried to use Ubuntu Unity, but it is just not what I want for my environment. I have always liked Gnome, and I approve of what the developers have done with Gnome 3. I tried installing Gnome 3 in Ubuntu 11.04, which had weird problems with the widgets on the toolbar and the Windows had old looking windows. I then updated to 11.10 alpha, only to find the operating system very unstable in both Unity and Gnome3.

So I’m moving back to Fedora. I have not had much time to sit down with it yet, but it is polished, and works perfectly with the Gnome3 desktop environment.

I will try to post some instructions for myself, and others, on installing some proprietary drivers and libraries, and my other modifications.


Games Redesign

I have updated B7 Games with a new design, and a few new features. The new blue colors are a little easier on the eyes than just white and green. I’ve also added rounded corners to make it less jagged. I have made use of CSS3 in the new design.

Pileon now has a feature that allows you to hover over a card, and see all of the other cards of the same number. It was easy to miss the card when scanning through to find matching cards, so I found this to be an easy way to fix it.


Organizing My Digital Life

I have recently been trying to separate out my work life and my personal life in the digital world. My work provides an Exchange account for me that I can sync my phone to, and I also had GMail set up (in the standard IMAP sync), but it was frustrating because my GMail contacts were not able to be synced up.

I recently found that GMail had the option to sync as if it were an Exchange server, and decided to set it up. Contacts, Calendar, and Mail worked great from GMail, so I decided to move all of my personal contacts from my work address book to my GMail.

I had already separated out my personal contacts into their own folder, so I simply exported the personal contacts folder from outlook to CSV (Windows) format, and imported them into GMail. One thing that you will have to watch out for is phone numbers. It will only add those phone numbers to the iPhone if they are in a category the iPhone supports (could be an exchange standards issue though). I used “Mobile”, “Home”, and “Work” for the phone category.

I also added birthdays, and any photos I could find by finding the person on facebook, find the photo, right click on the “Download” link for the photo and copying it, and then in GMail, change the profile picture using a Web Address, and paste it in.

For businesses in GMail contacts, you can just set the business name by going to Add->Title and Company at the bottom, and just add a company, without a name or title. Doing this will avoid First/Last disordering.

I would really like to see a feature that would combine spouses.

Another cool feature of GMail’s exchange connector, is that you can search the Global Addressbook for names that are not in My Contacts. That will keep your list cleaned up, but still allow you access to everyone that you’ve ever emailed.

I have also made use of GMail’s task list for personal items, and Outlook’s task list for work, but the iPhone doesn’t support syncing those yet. The calendars  are working great though. I’ll keep all of my wedding and personal events on Google Calendar, and any work events I will keep on the server at work.

This is really going to help my organization. I’m also thinking about what to do for my garage and house. It tends to get messy a few days after I clean it, so I want to implement a few things to keep me organized. I’ll try to update it with any solutions I come up with, so stay tuned.


Net Neutrality

Net Neutrality has been an issue for a few years now, and the FCC is about to make a final decision. I agree a lot with what Senator Al Franken has to say on the topic. An article on arstechnica explains it pretty well.

I however, do not agree with the letter from the republicans opposing net neutrality. They say that, “[the rules] will likely reduce the potential for innovation and investment in broadband network.” So, putting rules in place to prevent traffic segregation is going to be bad for innovation. If Verizon were to block Hulu and Netflix, and only allow customers to use their video service, that would help innovation? That’s not what I call “innovation.”

I believe that the internet should remain open and free. Blocking out competition, or making that competition seem slow and unresponsive, will create monopolies and stifle innovation, not create innovation.

If I pay for 10 Mb/s, and you want to give me 20 Mb/s to your own video service for free, then that would be fine, but it is unacceptable to cut down competitive products.

I am joining with others in calling for true net neutrality.


Death and My Digital Personality

I try not to be too morbid when it comes to death, but I have a lot of different online profiles that others may depend on that no other user has information about. I have many passwords, most of which are random combinations of things from my past. I think most would not be guessable by anyone that I have not told directly, and all of them would be difficult to use brute force to unlock, so the chances of a family member or a friend figuring it is very slim.

I don’t have a will currently, but since my family does not have many branches, I have assumed that they could divvy up my possessions without problems.

Lifehacker has posted an article, “What Should I Do About My Virtual Life After Death.” It has some good information.

I have considered having a USB drive with encrypted username, passwords, and further information with a plan of action, and giving the password to a trusted individual that would be responsible for taking care of any of my remaining accounts. The USB drive could be kept in a safe deposit box, in the bottom of an undergarment drawer, but preferably, a place that is secured until death.

I’ve found Stenography to be an interesting form of data storage, as it would look like a normal image or audio file. If a software was available that had proven security, it might be an option at throwing off someone who might be able to get their hands on your data without your consent, but there’s no guarantee that they wouldn’t assume it contains data.

I’m still working on my plan of action, but I would like to get the most important data in a safe place.


ZenOSS: A Call for Better Documentation

ZenOSS is a good piece of software, but when you want to do more than obvious items, good luck finding out how to do so. Documentation is spread out among 4 or 5 papers that do not seem logical to me. And in the interface a lot of times, it gives you a freeform textfield when it only accepts certain items (i.e. Multi-Graph Data Points). No Ajax pulldown. Not even a hint listed in the documentation. So please, spend some time on your product, and if you expect to get anywhere with the commercial version, you’re going to need to make the open-source version slightly better.

And don’t expect your users to be able to travel to California for Q&A. We don’t all have jobs and extra cash that allows us to go 600 miles for this.

</rant> Thank you.

Programming Technology

Hex Slideshow

This is totally and utterly pointless, but in case someone finds it interesting besides me, here’s a page I like to call “Hex Show”.

Hex Show

It does have some pretty neat JavaScript, and it’s not too complicated. Feel free to use, modify, or steal the code, just put my name on it if there’s enough of it to matter.


My Take On Google Chrome

Google Chrome is the new web browser that has changed the way I browse. There’s lots of things I like about it, and lots of bugs that I wish would get fixed.

They’ve really cleaned up the screen space in the program. They combined the title bar with the tabs, which is a real plus. They removed the status bar, which was a bit annoying at first as I like to see what link I’m clicking on, but it turns out the status area pops up when you hover over a link.

I also like that search and the url bar are one bar. It comes in handy when you don’t exactly know if you’re looking for a .org, .net, or .com. It’s pretty hard to go back to Firefox when I get used to Chrome though.

I really miss the “/” to search. In Firefox, you could use “/”, and you would press enter to follow the link. In Chrome, the user must press Ctrl-F, and the enter key goes to the next search result. To follow the link, I either have to click it with the mouse (annoying), or press escape to exit search, and enter.

I don’t quite understand the tab-unresponsive dialog. When the tab stops working correctly, it says I can close it or wait, but the only button on the dialog is “Wait”.

While there are other various bugs, it’s a pretty good program so far. I’ve really been a big fan of Firefox from the beginning, but sometimes it takes a whole new program to create new ideas. I hope to see even more improvements to Chrome, and maybe Firefox will join some of the ideas to create a more stable browser for Linux.