Clicky

Something I ran into a while back while writing tests.

If intentionally testing code for an exception then it is required to add an annotation above the test method.

Read More

Share this Story

Goal: Search all users who were updated between a certain time period (in our case one day).

Scenario: A system wide glitch caused a set of users to have all of their last names changed to Smith. Your manager wants to know how many records are affected.

Read More

Share this Story

Programming is useful and important.

I like to compare programming to oil in that cars require oil to operate and business require programmers. If a business intends to compete most likely they have an IT team. Many times the competitive advantage for a company relies on technology. Most technology if not all requires software development.

Even if very basic programming interests you there are some awesome courses. Some courses are self-paced and some have deadlines.

Awesome list of courses

Share this Story

Believe it or not you have power in your fingers tips through social media.

If you’re a regular on social media then mentioning your favorite brands can be powerful whether the experience was good or poor. I’ve encountered a few poor experiences and each occasion I reached out via twitter. In most cases I received a response within a few hours and they have offered to resolve any issues.

It is a win-win situation. Any good manager will appreciate the good and bad. If the experience was not up to par hopefully the manager will provide an incentive to comeback.

Ultimately most companies don’t like bad PR. Generally large companies have social media teams that handle responding to customers. Information spreads very rapidly and it is crucial to resolve issues quickly before it escalates. Notably Comcast had disaster to clean up when one man posted his conversation with a customer service rep while trying to cancel his service.

Share this Story

Make a point to brush your teeth prior to late night normal eating time.

If the urge to eat occurs train yourself to brush your teeth instead.

The idea is to deter yourself from eating because:

  1. Food will taste disgusting after brushing teeth.
  2. Brushing teeth second time at night requires extra effort.

 

Share this Story

If you’ve used the WHMCS software billable time feature you know the invoice is created, sends email, and sets the same day as due date after generating the invoice from billable time entries.

The problem with this is it provides a negative user experience because it will be jarring to a customer receiving an invoice with no explanation AND due the same day received.

I looked numerous times for a solution or work around and finally found one that worked.

  1. Mark all your time entries to invoice on next cron.
  2. Visit the clients’ profile and click “Generate due invoices”
    1. WHMCS  will ask if you want to send emails right now or no.
    2. Choose no and visit the invoices tab.
    3. Each billable time entry will be it’s own invoice.
  3. Visit the invoices tab for the client. Fortunately invoices can be merged.
  4. If you have a lot of time entries filter by invoice status unpaid.
  5. Select all invoices that should be merged
  6. Click the merge invoices button.
  7. This will have pulled all the items in to a single invoice.
  8. Change the due date to something more appropriate before sending the invoice to the client.

I hope this helps someone who had the same issues for me.

Source: WHMCS Forum

Share this Story

Before graduating if your school allows Alum to signup for an email address they can keep do it! There are many valuable reasons to keep a .edu address, discounts and freebies. Most perks are only temporary. Everything from Apple discounts to free web hosting. The idea behind providing perks to students are getting the students acclimated with products. Assuming the products are good this will entice the student to continue using and maybe pay for the product. Generally if discounts are offered online the single requirement is a .edu address.

If discounts and freebies sound good here are a few:

Discounts

Freebies

This is a fraction of what exists for students. If you have your .edu address handy search online for student discounts before buying something. Even if the discount or freebie is small in most cases it is worth it. As mentioned above sometimes simply finding the student site will yield discounts as some places don’t require proof at all.

Note: It may be against the company’s policy if not currently enrolled in school.

Share this Story

apt-get-stuck-0-percent

I had an issue where I installed Ubuntu 14.04 in VirtualBox and apt-get kept hanging at 0%.

I noticed it was automatically attempting to use IPv6 because normally apt-get says connecting to us.archive.ubuntu.com the IPv4 address (eg 0% connecting to us.archive.ubuntu.com 111.111.111.111). This time the address looked like version 6.

To force apt-get to use IPv4 exclusively

  1. Create a file in /etc/apt/apt.conf.d/99force-ipv4
  2. Add this line to newly created file Acquire::ForceIPv4 false;
  3. Apt-get will now use IPv4 exclusively

 

This article on StackExchange helped me find the right answer!
Convince apt-get *not* to use IPv6

Share this Story

I fell into the trap while installing Ubuntu in virtual box to only give Ubuntu 8gb for the hard drive because it was recommended. I quickly realized that this wasn’t big enough. While searching on the internet I found the commands for virtualbox to increase the VDI size. I ran the command and started Ubuntu. Everything appeared normal until after logging in. Ubuntu just sat and didn’t do anything. After realized that the resize likely caused this issue I searched online and found a great article  Growing a hard drive partition in a VirtualBox ubuntu guest. The article mentions resizing Ubuntu’s partition after resizing the VDI. I resized the partition and everything is working as expected!

Steps to resize VDI

  1. Run VBoxManage modifyhd <absolute path to file> –resize <size in MB>
  2. Boot the VM to either gparted cd or Ubuntu live CD
  3. Resize Ubuntu’s main partition (You might need to delete the swap partition and readd to move main parititon)
  4. Restart
  5. Enjoy :)
Share this Story

Laravel 4 is capable of running on a shared hosting environment. It’s a lot easier than you probably think.

  1. Login to your host and go to your home directory. This does not mean your public home directory, they are separate.
  2. Upload all the contents Laravel project EXCEPT the public folder to your home directory.
  3. Upload the contents of your Laravel public directory to your public directory on your host. The public directory is sometimes called public_html.
  4. Edit file paths.php located in the bootstrap folder so the public path matches the path to your public directory on your host.

After completing each of those steps you should now have a working Laravel 4 project on a shared hosting environment. This assumes the shared host has all the PHPmodules required to run Laravel as well. I was able to accomplish this on HostGator.

If you have any questions feel free to ask.

Share this Story