Website Performance - We can Help - Merkados
Website Design Promo

List Folders and Subfolders in order of File Size in Bash

February 15th, 2021 admin

This is the command in bash that you would need to list the folders and subfolders of a directory in order of file size. This is useful because you may need to know in what directory you have bigger files – for example when trying to delete old big emails.

 

/* Command to enter in Bash*/
du -h --max-depth=1 2> /dev/null | sort -n -r | head -n20
/*End of Code*/

Strategically Smarter Business – The SWOT Analysis

August 27th, 2020 admin

Albert S. Humphrey is credited to have invented the SWOT analysis (1). It is a structured planning method that allows individuals, businesses and organizations to evaluate their internal and external factors to achieving a particular objective. In the specifics of a marketing strategy a SWOT analysis allows a business to identify their core competencies and use them as the foundation of their competitive advantage.

SWOT stands for:

  • Strengths
  • Weaknesses
  • Opportunities
  • Threats

It is my opinion that building a business that doesn’t display the owners strength is indeed a mistake. In my professional experience, businesses that rely solely on the hard work of employees, must likely will have a very difficult time competing against businesses of people that have an incredible passion for what they do. An example of this very thing is the last five years of Apple versus Microsoft. Apple was losing the battle of the personal computer until Steve Jobs went back to its “baby”. And one man, Steve Jobs, was capable of injecting so much passion into the entire organization that Apple became the most valuable company in the world. In the meantime, Microsoft had an incredible amount of very talented and hard working people. The competitive advantage came by the focus that Steve Jobs brought through his passion. Imagine how difficult it would’ve been for Steve Jobs to make other companies succeed, for example his other venture Next.

The Swot analysis has two parts. The internal factors: Strengths and Weaknesses and the external factors: The opportunities and Threats.

Internal Factors

The internal aspects deal with those items that the organization already has or doesn’t. For example a specific business may have a great tech support team, an incredible manufacturing facility or a well refined process. In terms of weaknesses, the organization may be too young, or it may be that the business has only one person that knows the intricacies of the product development and therefore it has a bottleneck, etc.

The importance of recognizing the strengths is that the focus of the business should be to compete in those areas. Offering services and products that highlight what makes you strong, will increasingly provide value to your audience because not everybody is as strong as you are.

On the other hand, identifying the weaknesses shouldn’t be just an exercise just to try to eliminate them, also it should provide feedback on the ways in which the business shouldn’t compete. For example, my perception of Hyundai cars doesn’t tend to luxury vehicles. And in the past, Hyundai has demonstrated that their strength lies in competing for low cost vehicles. Now, Hyundai is developing new cars that are “designed” to compete with the luxury market. In my opinion, strategically this is a mistake. Why? Because they can’t do a great job in both. The company can’t be as strong if they focus in both creating low cost vehicles and high cost vehicles. By focusing on both it takes away focus and resources from one or the other. Ultimately, it is in their best interest to choose whichever segment they are stronger at and compete there.

External Factors

Externally you find the opportunities and the threats. Opportunities describe those aspects of the environment that could be exploited in the future for additional advantage. And threats indicate the potential risks that the environment may present that would undermine the competitive position that the company enjoys.

External factors are more difficult to determine since they involve a great deal of speculation. However, planning for unexpected events may prove beneficial in the long term.

The Most Important Part of SWOT

In my opinion, the most important aspect of a SWOT analysis is to identify your strengths. You should devote the vast majority of the analysis in the “S” part. Once you identify what you are really good at – you’ll be in a better position to compete online. In my experience, most people that offer their products or services online have trouble identifying what is it that they do better than the competition. Sometimes they don’t even know their competitors and when they do, very rarely can they put into words what the competitors do better than them and vice versa. The reason this is important, is because whether you like it or not, you are competing. Your audience will either buy your product or they will find somebody else to fill their need. It is a competition. So it is important to treat it like one. As it is unacceptable for an athlete to show up unprepared to the track, so its unacceptable for a business to not do their homework on their competition and most importantly on themselves. Make sure that you know what are you good at. This should give you a better idea on how to focus your business to become the best it can be.
Exercises:
1. Identify the strengths and the weaknesses of your internet business. Questions that may help you do that:
a. Do you have a larger promotion budget than your competitors?
b. Is your product or service significantly better than your competitors? Why is it better?
c. What attributes do you offer that your competitors are not offering?
d. Do you see any clear weaknesses that your competitors have that you can exploit with your strengths?
e. Do you see any clear weaknesses in your business?

2. Identify the opportunities and threats of your internet business. Questions that may help:
a. Are there any significant trends that seem to be affecting your business environment?
b. Do you see any patterns of language in your industry or among your competitors?
c. Do you foresee any actions that your competitors, your industry or your government are taking that may lead to significant changes in the way that you do business?

1. Humphrey, Albert (December 2005). “SWOT Analysis for Management Consulting”. SRI Alumni Newsletter (SRI International).

7 Keys to Success

August 27th, 2020 admin

In my opinion, success is more a combination of 1. The right approach and 2. The proper motivation, instead of the implementation of lots of little secrets. I am going to share with you some important key distinctions that may help you become successful at anything you want.

1. Focus on your target result. Focus feeds proximity and proximity feeds focus. You get what you focus on. If you buy magazines and books about your desired results you’ll eventually know more about the topic and get better at it. If you have a vivid imagination, spend a few minutes a day describing the future that you want to yourself. Be extremely specific and don’t hesitate to “focus” on the details. This will help you get clear about what you really want. And believe it or not, in my experience, most people are not truly clear about their objective – their desires.

2. “Do” instead of “Plan”. A car is easier to steer in the right direction when it’s moving in any direction. Just as a car, you will have an easier time moving forward and achieving your goals if you are doing something. It doesn’t have to be perfect. I see many people that have problems getting started because they truly want it to be perfect. Don’t even worry about being great. Just move forward: do something! Once you have something, then it is easier for you, or for somebody else, to revise it and give you ideas on how to improve it. But planning until its perfect will get you nowhere. Do you want to lose weight? Set a goal of 1 pound. Then act with all your power to do anything it takes to achieve that goal. Why is it easier to be successful that way? Because you are moving forward. Start today with something. Anything. Even if it is in the wrong direction. Move!

3. Talk to others about your idea. Make notes, take criticism and continue to refine. Don’t make the mistake of just keeping your ideas to yourself. Sometimes the fear is that if you share it with people, that they will steal it and “make millions” or worse, that they will criticize you. Although that is possible, believe me, that is highly unlikely. What is highly likely is the fact that by sharing your ideas and plans with others, you’ll get motivated and you’ll become socially accountable to them. This will put a bit of pressure on your plate to get things done. That’s always good. Be disciplined and speak about your plans and ideas with as many trustworthy people as you can.

4. Train yourself to accept reasonable risk (moving out of your comfort zone). Only risk is rewarded – that’s a law of nature. Only the people that lend money get an interest. Only the farmer that plants gets a crop. If you don’t learn to risk something and to put something you value on the line, you’ll have a difficult time succeeding. Think about it, every time that you are scared or feel pain about doing something is because your brain is telling you that you want it, but at the same time its telling you that there’s a risk involved. Make an effort not to focus on the risk – because if you do, you’ll only see the potential loss. If you focus on the potential reward then it’ll be easier to overcome your obstacles and achieve what you are looking for. Also, as an exercise, try to mentally rehearse the worst case scenarios and what kind of pain are you really going to experience if those scenarios were to become true. This small exercise will show you that for the most part the associated perceived risk is composed of two parts: 1. The real risk associated to taking action and 2. The fear of the unknown. By rehearsing the worst case scenarios you basically destroy the fear of the unknown and are left with only the true risk of taking action – therefore making it easier to measure if it is worth it.

5. Stay when everybody has left. Practice when practice is over. Kobe Bryant, NBA basketball player, used to train after every practice. For most people practice is where they are acquiring the skills to succeed. But in the world in which we live today, everybody is going to practice. The true exceptional people are the ones that stay after practice. Those are the ones that excel. Those are the people that will reach the next level. Of course, it is impossible to consistently do this, unless you love what you do. This in itself will kill you psychologically. So remember to dedicate your attention and focus to that specific skill which you love and which you are strong at. That way, when it is time for everybody else to go home, you’ll still want to stay and practice another 100 shots.

6. Find a minimum effort that makes you move in the right direction and just commit to that. I call this: SADs: Small Acts of Discipline. Your momentum is what will carry you into higher accomplishments. I see many people that can’t move forward because in their mind the tasks are simply too big or too difficult. They relate the task to perceived future pain and therefore try to stay away. But when all you do is commit to a small effort, you’ll find that momentum can carry a very important weight. For example, when you want to start a running regime, don’t mentally commit to running 10 miles every day, otherwise your brain will immediately reject the idea. However, if instead you commit to running 2 minutes next time and you stick to it, believe me that once you are running 2 minutes – you’ll know that you might as well run another 5 minutes. Before you know it, you’ll eventually be able to run more and more time and just by having the discipline to do the small. The Bible says it in this way: “He who is faithful in the little is faithful in the much”.

7. Make a mental list of all the people that have made fun of you, have belittle you or thought that you would never amount to anything. Every time that you are at that moment when you are tired and don’t want to take action, pull that mental list. And then think of this: “I don’t owe anything to anybody, in the secret of my mind, they don’t know the struggle that I am having, but if I can move the needle even a small bit in the direction of my goals, I will have proven all those people wrong about me.”

That’s it – This techniques should help you become more effective in reaching your goals.

How to get the MX records of a Domain

April 27th, 2020 admin

Quick little post. You may need to know the MX DNS record of a domain in order to know what server handles the communications. You can find out via terminal (BASH). Here is how:

dig merkados.com mx +short

That’s it folks – until next time.

Search / Find files modified in the last x days with Bash in Terminal

March 13th, 2020 admin

So, if you are like me, sometimes for any number of reasons, you have to find all the files of a certain type that have been modified lately. For example, if a client had a security problem with their website and you would like to check what files where modified since the last backup. Or let’s say that you don’t remember what files you modified the last time that you made some changes to a directory, etc.

Read the rest of this entry »

Replacing a Character in a MySQL table using REPLACE

November 24th, 2019 admin

The latest replacement I had to do was to change all occurrences of an apostrophe with a single quote in a table. Now, that wouldn’t be a lot of fun to do by hand and believe me, with the number of records it would also be exhausting! So, this is a very quick post that shows you how to update a table, using the REPLACE function in MySQL to change one character:

1. First go ahead and find out how many records are going to be affected:

SELECT * FROM table1 WHERE column1 LIKE "%\'%";

2. Once you know the number of records then simply run the update routine:

UPDATE table1 SET column1 = REPLACE(column1, "\’", "\'") 
WHERE column1 LIKE "%\’%"

That’s it – very simple. We are updating the table1 and setting the column1 to be equal to the result of a replace. The replace function takes three parameters: 1. The column, 2. The replacement pattern (in this case escaped by a backslash), and 3. The character to replace with – in this case, also escaped with backslash.

The result is a fine looking column of data with your new characters…

Enjoy!

The Perfect Intro – 6 Steps to a Persuasive Elevator Pitch

August 29th, 2019 admin

There are many books in marketing that talk about the elevator pitch. So why is it that the elevator pitch is actually something valuable in online marketing?

Elevator Pitch Intro
In my opinion it has to do with the fact that it allows the business owner (or the marketer) to become clear about what he is offering to the target market. In my experience, I have seen many examples of business owners that have an incredibly difficult time explaining what is the exact problem that they solve. Not to mention, that when they do explain it, its different every time.

When I help business owners come up with their elevator pitch, I have a set routine that I make them go through so that the result is a memorable (something they can memorize) paragraph that they can share with the world.

Allow me to share this routine with you. Read the rest of this entry »

7 Dangerous Online Marketing Mistakes Small Businesses Make and How to Avoid Them

June 11th, 2019 admin

7 Online Marketing Mistakes ReportThere is no question that in the game of chess, unless you understand strategy, you have no chance of success against a sophisticated opponent. Marketing your business online, also requires strategy. However, most businesses usually build a website, without a good understanding of the strategy behind it. It is not hard to imagine why they are getting such poor results. In the game of chess, of course, the looser goes home and everything continues as it was. Unfortunately in the game of online marketing, your business has to live -or die- with the consequences of bad strategy. Read the rest of this entry »

Upload folder is not writable. Export and file upload features will not be functional.

March 4th, 2019 admin

WordPress is a fantastic CMS platform. It is preferred by many clients and therefore as developers we end up using it for all sorts of projects. Sometimes, things go sour though. If you have moved a WordPress site from development to staging to production, you have run into funny problems such as the little red message called: “Upload folder is not writable. Export and file upload features will not be functional.”

Read the rest of this entry »

The easy tutorial of Rsync to “SYNC” two folders and its contents.

January 19th, 2019 admin

If you are looking for a solution to syncing two folders, whether it’s over a network or locally, this is how you do it.

In my opinion this is a very valuable specially when you have media files that are very important to you and you want to lose them.

The RSYNC command

The -a flag means “archive” which in turn means recursive and preserving symbolic links, ownership and permissions. In general, it is more likely to use -a than to use -r (recursive).

rsync -a sourceDir/ destinDir

The -n variable is meant as a test “dry-run” and so no actual changes are made. -v is Verbose.

rsync -anv sourceDir/ destinDir

The -z flag compresses the network transfer reducing the size of the transfer as much as possible. The -P flag combines –progress (progress bar) and –partial (to resume interrupted transfers).

rsync -azP sourceDir/ destinDir

The –delete flag deletes the files in the destination that have been removed in the source. Therefore keeping a true sync between both directories. Ideally run it with -nv flag first to make sure that is to be removed is what you want.

rsync --delete sourceDir/ destinDir

Summary

So in summary you want to use this to Sync two directories:

1. Run it as a test.

rsync -anv sourceDir/ destinationDir

2. Ready? Run it.

rsync -azPv sourceDir/ destinationDir

3. If the sync has been there before, and so now is truly about syncing the two directories then use:

rsync -azPv --delete sourceDir/ destinationDir

Note: If you use a slash at the end of the first directory, then it means: “The contents of sourceDirectory” but not the directory itself. On the other hand if you ommit the use of the slash in the sourceDirectory then it means: “The content of the sourceDirectory but also the SourceDirectory/ itself”.

Thanks again.