Where It All Started.

Where It All Started.

Life, Stock Trading, Investments, Business and Startup. Most are programming stuff.

Tag: tips

Find Unintended CSS Overflow

Ever coded an HTML static design site? I’m sure you’ve encountered problems where you’ve just installed some CSS framework then coded some additional CSS files. After you’ve finished the code you run it on a browser then TADAHHH!


You can only find truth with logic if you have already found truth without it.

— Gilbert Keith Chesterton.

There were overflows horizontal and vertical scrollbars. 😁

It’s a bit cumbersome to find where those scrollbar or overflow originated, so that’s what this article is for. In order to find those overflows, here’s a one liner that you can directly paste on your web developer console or just press F12 then the console tab. The console tab is the place where you look at javascript logs (console.log), anyways just copy this then analyze it first before pasting on your console.

javascript:void(function () {var docWidth = document.documentElement.offsetWidth;[].forEach.call(document.querySelectorAll('*'), function (el) {if (el.offsetWidth > docWidth) console.log(el)})})();

Here is the full script which had been beautified for readability:

var docWidth =  document.documentElement.offsetWidth;
[].forEach.call(document.querySelectorAll("*"), function(el) {
  if (el.offsetWidth > docWidth) {
    console.log(el);
  }
});

If you analyze carefully the code, you’ll see that on the first instruction it gets the current document offset width. Then it loops on all selector which are class and id’s, if it found an offending or greater than the offset width it will print that element attributes and location.

That’s all guys!

Let me know in the comments if you have questions or queries, you can also DM me directly.

Also follow me for similar article, tips, and tricks ❤.

Windows Network Discovery Using Built-in Tools

Success is neither magical nor mysterious. Success is the natural consequence of consistently applying basic fundamentals.

— E. James Rohn.

Hi guys, last week I’ve worked on a vanilla Windows 10 client computer without internet but is connected to a LAN with many computer.

I’ve asked myself on how to get all alive computers in the network using only built in tools from Windows.

Here are the things I’ve did in order to accomplish this feat.

First thing I did was ping all broadcast IP using ping <broadcast ip> -t -i 4. This will ping the broadcast IP, this action will spread and send all message to all active computers in the network. After that we would wait for around 5-10 seconds, and execute the follow up command which is arp -a. The arp command will check the address resolution protocol and list it down.

The -i 4 on the ping command instructs to ping only on IPv4 (Internet Protocol Version 4) network. That’s all there is to it. Kindly check the manual page of the commands for different flag combinations.

❌ Originally posted on August 18, 2019

Ten Techniques to Build Rapport

We can all fight against loneliness by engaging in random acts of kindness.

— Gail Honeyman.

Hello guys, in life no one lives alone, and no one can live alone. In this TIL (Today I Learned) we will discuss the things I’ve learned when trying to socialize with other people building rapport and connections.

  1. Establish artificial time constraints. Allow the potential source to feel that there is an end in sight.
  2. Remember non-verbals. Ensure that both your body language and voice are nonthreatening.
  3. Speak slower. Do not oversell and talk too fast. You lose credibility quickly and appear too strong and threatening.
  4. Have a sympathy or assistance theme. Human beings want to provide assistance and help. It also appeals to their ego that they may know more than you.
  5. Suspend your ego. This probably represents the hardest technique but, without a doubt, is the most effective. Do not build yourself up—build someone else up, and you will have strong rapport.
  6. Validate others. Human beings crave feeling connected and accepted. Validation feeds this need, and few offer it. Be the great validator and have instant, valuable rapport.
  7. Ask “how, when, and why” questions. When you want to dig deep and make a connection, asking these questions serves as the safest, most effective way. People will tell you what they are willing to talk about.
  8. Connect using quid pro quo. Some people are more guarded than others. Allow them to feel comfortable by sharing a little about yourself if needed. Do not overdo it.
  9. Give gifts (reciprocal altruism). Human beings reciprocate gifts given. Give a gift, either intangible or material, and seek a conversation and rapport in return.
  10. Manage expectations. Avoid feeling and embodying disappointment by ensuring that your methods focus on benefiting the targeted individual, not you. Ultimately, you will win, but your mind-set needs to focus on the other person.

Humans will be humans and humans are very dependent creature. That’s all for it thanks for reading. Follow me on my social media accounts and also on my podcasts.

How to Have a Good Conversation

Everything about Mark Zuckerberg is pure hacker. Hackers don’t take realities of the world for granted; they seek to break and rebuild what they don’t like. They seek to outsmart the world.

— Sarah Lacy.

Sometimes I need to talk to someone about some things and sometimes the conversation and rapport part doesn’t work out. Here are the things I’ve learned on how to have a good conversation to anyone.

  • Don’t multitask. Be present.
    If you’re the one talking, would you be happy if the listener is doing many things and like don’t care? So be present and active.
  • Don’t pontificate (meaning – express one’s opinions in a way considered annoyingly pompous and dogmatic.).
    Don’t just butt in when someone is speaking with their mind. Its considered rude to just cut someone who is talking, I think its same for every culture.
  • Use open-ended question.
    Go with questions that will create discussion not just question with a single word could answer.
  • Go with the flow.
    Follow the flow of the dialogues, and if you don’t like the subject of the discussion you can always say what you have in mind.
  • If you don’t know, say that you don’t know.
    Don’t be the all-knowing guy. Nobody likes the person who knows and pretend to know everything. Just say you don’t know if you really don’t know, and say no to smarty-pants.
  • Don’t equate your experience with theirs.
    Experience vary from person to person. It has different levels of emotions involved, don’t try.
  • Try not to repeat yourself.
    Speak clearly and with proper tone so the listener will know the intention.
  • Listen.
    Always listen, a great listener can be the most reliable person.
  • Be brief.
    Get to the point and don’t confuse the listener of what you want to say.

That’s all the things I’ve learned with having conversation to different people and walk of life.
Hope you guys, enjoyed this article and as always live life!

Check Total File Size of Files with Specific File Extension

Posted on by Edward Fitz

It is simply this: do not tire, never lose interest, never grow indifferent—lose your invaluable curiosity and you let yourself die. It’s as simple as that.

— Tove Jansson in Fair Play.

Recently, I wondered on how to check the file size of all files with a specific file extension on a folder / project. This is what I’ve found out after several experimentation using command line tools in Linux, this specific task could be accomplish with just one line of command. Check below for the actual command:

find . -name "*.dart" | xargs cat | wc -c

What this command does, is first find all file with the dart extension. Then pipe the output of that command in xargs converts the standard input to command arguments. After that pipe the output of xargs again to our favorite word counter wc.

Here are the command line tools use in the process.

  • xargs is a command on Unix and most Unix-like operating systems used to build and execute commands from standard input. It converts input from standard input into arguments to a command. Some commands such as grep and awk can take input either as command-line arguments or from the standard input. Wikipedia
  • find is a command-line utility that locates files based on some user-specified criteria and then applies some requested action on each matched object. Wikipedia
  • wc is a command in Unix and Unix-like operating systems. The program reads either standard input or a list of files and generates one or more of the following statistics: newline count, word count, and byte count. If a list of files is provided, both individual file and total statistics follow. Wikipedia

That’s it!

So guys, do you have any one-liner commands that you want to share? Just message me on my social media accounts. Hope you guys enjoyed this article!

How To Earn Passive Income (Asian Version)

It’s how you deal with failure that determines how you achieve success.

— David Feherty.

Hi guys, working 9-5 jobs is hard especially if its your only source of income. And almost every time, its not enough.

So here, will list down what are the best way to earn passive income (the Asian version).

What are the ways for a better future?

Here are the ways to make passive income even if you have 9-to-5 job. I know its never easy, and never will so we must’ve strive harder and think of more ways to earn.

Creating a mobile app

Making mobile app and deploying it to app store or play store can earn you passive income. Believe me there are ways, first is running mobile ads to your app. Another way is selling premium features of your app, but one thing is for sure — once the app’s deployed it will be like a cash cow sending you money.

Spreading links across the internet with your affiliate url is one way to earn money. By spreading your affiliate url, you earn commission for every user that would buy a product. This needs good marketing strategy, in order to earn more money in minimum amount of time.

Making Youtube videos

Many vloggers right now in YouTube are earning money from the videos they make. Post a video wait for viewers to view your content then instant money. But there is a threshold before you can earn money from this and mostly you have a lot of competitor. But sincerely its one of the best passive income generator.

Make a blog

Earning through a blog may take years, but it pays off when you have lot of readers. Also may take time before you get big. So start now! One of the ways you could earn money from it is sharing your affiliate link and giving reviews. As well as accepting ads or earning revenues from ads. If you don’t want to start from scratch you could buy a blog.

Creating online course materials and webinar

Online course is booming since 2015, and its expected to grow more. This is the best way to earn passive income, just create a content you want to teach and deploy it multiple times in sites like Udemy and Teachable. Once all your resources done, all you need to do is relax and wait for it to earn money. Similar to webinar, schedule webinar and deploy your pre-made course every now and then.

Creating e-books

With the increasing popularity of digital books, its now considered as one way to earn passive income. Authors now bypass publishers when publishing their own books. You could check out my article on using ascii doctor to create an e-book using opensource tools here. Selling those ebooks in sites like Amazon KDP, other way is sell it on your own store.

Selling photos

Photographs, selling photographs that has deep meaning or has an artistic side could earn you some bucks. Posting it to stock photos site like Pexel as many companies or individual that are searching for the right photo.

Becoming an early stage

One word risky, investing in early stage startup has many pros and cons. Being a seed investor gets you a lot of perks as you can join the startup and promote it. But one thing you should only invest in a startup you believe in.

Buying bluechip

Buying stocks is one of the best way to earn passive incomes, but you gotta have years of patience waiting for it to grow. Also picking the right stocks to invest could make you a millionair in just 5-8 years. Investing into it needs also large sum of money to gain large position increase.

Conclusion

In this day of age, there are ways now to earn passive income. Probably not so passive but still you’ll only need to put 20% and earn 80% from it. This posts will get updates from time to time as it is still incomplete. Stay tune for more updates.