Posts

Link Post: Why You Should Never Use MongoDB

An interesting article about how Diaspora starting using MongoDB and switched over to MySQL after they ran into problems with consistency. It's a little long but I would recommend reading it because it explains one of the problems with using a document-oriented database. I would also like to say that I'm not a NoSQL database expert but I love the structured nature that traditional SQL gives us plus we have decades of experience with people using it.

http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/

Link Post: 17 Ancient Abandoned Websites That Still Work

How far we've come.

http://mentalfloss.com/article/53792/17-ancient-abandoned-websites-still-work

Link Post: Automating Front-end Workflow

I'm always looking for ways to improve my workflow and on Shop Talk Show #90 they mentioned this presentation. It has a LOT of tools that I'm going to be experimenting with.

https://speakerdeck.com/addyosmani/automating-front-end-workflow

Sublime Text Settings That Will Approve Your Life

I recently purchased a new computer and as part of that I had to reinstall Sublime Text (I always look at new computers as a clean slate so I don't copy over any of my settings). As I did so I had to go back through and find all the changes I've made to to my preferences. Here are some of the changes I've made in order to improve the way I develop. Read More

Ciconia

I'm a big fan of using Markdown in my projects so I'm always on the lookout for libraries that help me do that. I just saw Ciconia and it's a PHP 5.4 Markdown parser that supports GitHub Flavored Markdown. As an added bonus it's MIT Licensed so it could be used for closed source projects.

https://github.com/kzykhys/Ciconia

Deleting All of a Specific File From A Directory

Lets say you need to delete a bunch of files from a directory like all the vssver2.scc files or something similar. You could manually delete each file or you could use some quick command line fu:

find /path/to/directory -name "file.name" -exec rm -f {} \;

Fixing a Disassociated Vagrant VM

We recently switched over to using git and vagrant at work and during one of my trainings with a new programmer his computer crashed. After his computer rebooted and he got everything back up and running when he ran vagrant up it started recreating his VM. It hit a point where it tried to rename the newly created VM and reported an error (I'm actually amazed that vagrant doesn't check for this initially) when it found one already existed with the same name. We could have just deleted the VM and started over but he had already started to enter test data that we didn't want to loose.

In order to fix this we found out a couple things.

  1. Every VM in VirtualBox has a unique ID. If you open the .vbox file for a VM there will be a section that looks like this:

    <Machine uuid="{2489fd71-90eb-4142-848d-d06dab9bfa9b}"
    

    The part after the uuid= is the ID.

  2. Vagrant associates your project with your VM in the .vagrant/machines/default/virtualbox/id file (based off the location of your Vagrantfile). This file contains the VM's unique ID.

  3. If the UID in the vagrant id file doesn't match the UID in the .vbox file Vagrant won't be able to operate on your VM. Duh! Right?
  4. Copying the UID from the .vbox file to the id file fixs the problem.

Ultimately, I'm happy that it was all simple text files so we didn't have to spend the time exporting his test data and waiting while a new VM was created.

Link Post: Puppet CookBook

http://www.puppetcookbook.com/

Link Post: Million Lines of Code

A cool infographic that shows how many lines of code various codebases have. I'm still amazed by the fact that healthcare.org contains 500 million lines of code. That just seems like a copy and paste development process that's totally out of control or it's being reported wrong.

http://www.informationisbeautiful.net/visualizations/million-lines-of-code/

Installing Ruby Gems in Puppet

I'm a big fan of Sass and Compass so I've been using them in all my projects. While I could install it on my local computer and use the watch command locally I would rather offload them to my VM. I'm doing this because I'm compiling the resulting CSS files on the server when we update the site so it's the same process.

Using Puppet with Vagrant this can easily be done by adding the following section to your default.pp:

package { ['sass', 'compass']:
  ensure => 'installed',
  provider => 'gem',
}
RSS

Join Our Mailing List!

View previous campaigns.

Top Posts

  1. Working With Soft Deletes in Laravel (By Example)
  2. Fixing CMake was unable to find a build program corresponding to "Unix Makefiles"
  3. Upgrading to Laravel 8.x
  4. Get The Count of the Number of Users in an AD Group
  5. Multiple Vagrant VMs in One Vagrantfile
  6. Fixing the "this is larger than GitHub's recommended maximum file size of 50.00 MB" error
  7. Changing the Directory Vagrant Stores the VMs In
  8. Accepting Android SDK Licenses From The OSX Command Line
  9. Fixing the 'Target class [config] does not exist' Error
  10. Using Rectangle to Manage MacOS Windows

subscribe via RSS

All content copyright This Programming Thing 2012 - 2021
Blogging about PHP, MySQL, Zend Framework, MySQL, Server Administration and Programming in general