Find Large Files in *NIX

I recently ran into an issue where backups for a project were taking much more space than I thought they should. I figured there was a large error log somewhere – and sure enough I was able to easily find it with the following command:


du -sh *

That command du (disk usage) along with the options -sh (s = summarize, h = human readable) will then output something like this:

7.9M	admin
700K	api
1.4G	delivery
4.0K	error_log
44K	images
4.0K	index.php
4.0K	robots.txt

From there I can then see that the big disk space hog is in the “delivery” directory. Running the command then within that directory then showed there was a huge 1.4G error log which needed addressed.

This command is very useful and will save a lot of time if you run into a similar situation as I did.

Best End of Day Ritual

I found that I am most productive within the first 2 hours of each work day so at the end of each day I like to make sure I am set up for a successful tomorrow.

One of most helpful things I have found over the past few years is to make a list for everything I need to accomplish for the next day. How to keep it real? I only use Post-It notes to make sure my list is reasonable and something I can accomplish.

It is surprisingly satisfactory to cross things off the list. When things are really crazy – lists help keep priorities in line as well.

Feeling stressed or overwhelmed in the AM? Try grabbing a Post-It note and making a reasonable list!

Don’t Be Afraid to Say No

If you spend all your time trying to make everyone happy – you are really making no one happy (including yourself). Once you realize you will never make everyone happy – you open yourself to making decisions based on fairness and reason. Don’t be afraid to say no!

What Can Siri Do For Me?

If you are like me – you have an Apple iPhone and the thought of using Siri sounds awesome but after a few smart comments trying to get her to say something funny back (because you are not sure what all you can really say/get out of Siri) – you forget about her and move on.

Apple recently updated the Siri page so now you can easily find out what you can ask her to make her as useful as you wanted her to be all this time. Enjoy!

http://www.apple.com/ios/siri/

My new favorite things to do with Siri

  • “Flip a coin”
  • “Yes or no?”
  • “Take a picture”
  • “Why did the chicken cross the road?”
  • “How humid is it in Chicago right now?”
  • “Pick a card”
  • “Call me champ” (or whatever you want to be called)

Custom Date Sort with jQuery Tablesorter and Bootstrap Table Plugin

In the past week I have dealt with two different needs to sort a table date column (using a custom date format) using a JS plugin jQuery Tablesorter 2.0 and Bootstrap Table. If you use custom date formats – the default sort will not always work. In my case – it was sorting the dates by month name alphabetically and not by date order. Here is how you can use both plugins to sort by date order:

Example date format: Jan 28-Jan 31 (date for this example was a span of dates – in which I wanted to sort by the starting date)

Custom date sort solution in two steps for jQuery Tablesorter and Bootstrap Table:

jQuery Tablesorter

  1. Add data to the table header:
    <th data-sorter="shortDate" data-date-format="yyyymmdd">Date</th>
  2. Add a hidden span before your actual date in the data that then matches the format specificed above:
    <span style="display:none"><?php echo date( "Ymd", strtotime($date) ));?></span> Jan 28-Jan 31

Very similar to the jQuery Tablesorter solution:

Bootstrap Table

  1. Add data to the table header:
    <th data-field="created" data-sortable="true">Created</th>
  2. Add a hidden span before your actual date in the data that then matches the format specificed above:
    <span style="display:none"><?php echo date( "Ymd", strtotime($date) ));?></span> Jan 28-Jan 31

Now you can easily sort any date format using these two plugins so you can format the date however you want and still be able to sort by date on that column.

#1 Rule for Being Productive

Focus on what is really important.

It is that simple. I was reminded this morning that a lot of people are not very productive and overwhelmed because they fail to focus on what is really important. Instead they waste a lot of time and effort on what is not important.

If you find yourself putting a lot of time and energy into something – ask yourself (sometimes multiple times) – “Is this what is really important?”

Example: people will get stuck in the “you said/I said” cycle and spend hours on that all while complaining that they have no time to do the actual task – they just get stuck talking about it. Know when to stop talking about something and actually do something about it.

The action is what is really important – not over talking about the action. Yes – this means you sometimes need to leave your ego at the door because at the end of the day your ego is never more important than what you actually do/accomplish.

Small Changes = Big Results

Looking to make some changes in your life? Try doing the same – small – assessable changes. Small steps allow for big changes. Every month or so – I try and re-assess where I am at both personally and professionally and then create new goals. (Think mini New Years resolutions that actually happen.)

Examples:

  • Personal: take 2 hours to do nothing except relax on a weekend day (without feeling guilty)
  • Personal: do 100 push-ups for 100 days
  • Personal: substitute nuts for chips for snacks
  • Personal: call old friends who I have not spoken to in the last 2-3 months
  • Professional: increase transparency by making sure each client logs in and understands our project management system
  • Professional: find a way to give back (donation, time) to a cause
  • Professional: talk about the benefit of unit testing for clients who could benefit from it

Make sure you write your goals down so once you have achieved them, you can cross them out. This sounds simple/not-important but crossing something off is surprisingly rewarding. This also helps you re-assess your priorities and goals for the next month.

Planning/re-assessing every few months works well for me because it makes me focus on things that are obtainable, assessable, and allow for tweaks/changes along the way (vs. big plans/big failures). I know not everything will go perfectly or as planned – but keeping on track and allowing myself flexibility ultimately allows me more success than failure.

Business Attire in My Business

I own and run a web development business and not unlike other types of businesses – what you wear when meeting with clients is important and sends a message about who you are.

When getting ready to meet my clients in person – I can still hear my mother in the back of my head “wear something nice, look professional” (not that she ever told me that – but I imagine she would if I still lived with her). Perhaps older generations do not understand is that the tech business is much different than others.

If someone in my position came to meet with me in a business suit – most people might think “wow this person is really professional and put together.”

As a tech person – if I see this same person dressed in a suit – I think “wow – this person is trying to sell me something vs. knows how to solve my technical problem.” I do not think less or more of them – I just get a different message. I feel that people in our business who are comfortable with their skills and themselves will dress more casually and not “hide behind” a suit.

I am not saying you should show up in a t-shirt and sweat pants – nor do I think you should never wear a suitto a meeting. I would just make sure you are comfortable with what you bring to the table and make sure you represent yourself in a way you are proud of/comfortable with and own it.

While I agree that what you wear sends a message – the message can differ and be interpreted differently by people. For fun, next time you have a tech person come in for a meeting – just take note of their dress and see if it correlates with the thought above (selling something vs solving something). I think most of the time you will agree with my statements above.

How to Empty Trash with Google Drive

Over the last week – I have been trying to clean up my files and delete any non-essential email in order to tidy everything up. After deleting a number of files – I noticed my quota within Google Drive was still showing the same percent full before and after I deleted the files.

After waiting a few days and still not seeing any change in the size in the Google quota – I decided I needed to take some further action. I then realized – that when you delete files in your Google Drive – you then need to “empty the trash” before the files are actually gone.

How to empty the trash:

  1. Log into Google Drive
  2. Click on the trash icon in the left sidebar
  3. At the top of the page – you will now see a Trash menu. Click on that and then choose “Empty Trash”

After you are all done emptying the trash – check out your newly updated storage quota.