Where It All Started.

Where It All Started.

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

Month: February 2019

Creating Bootable ISO from macOS Installer

If the freedom of speech is taken away then dumb and silent we may be led, like sheep to the slaughter.

— George Washington.

Recently, I’ve been in a situation on where I want to create a separate portable macOS Mojave1 installer but I don’t know how. I’ve compiled this steps which I gathered from multiple sources to create a boot-able macOS installer. This article will assume you are running on macOS system.

  1. First and foremost, we download the macOS installer that we want to use from the Apple App Store. I pick the latest one (at this time of writing) which is Mojave.
  2. After that export an environment variable to hold the output ISO filename that we will be consuming. export ISO_PATH="mac_installer.iso"
  3. Then we create a blank dmg volume using the command hdiutil2. This command will create a HFS+J filesystem table to store the installer data with the capacity of 6GB. hdiutil create -o "$ISO_PATH.cdr" -size 6g -layout SPUD -fs HFS+J`
  4. Mount the created volume. If you get a problem while mounting the volume, try to create the folder first using mkdir -p /Volumes/install_build. hdiutil attach "$ISO_PATH.cdr.dmg" -noverify -mountpoint /Volumes/install_build`
  5. After that run the setup to install and copy the files in the volume that we mounted earlier. sudo "/Application/Install macOS Mojave.app/Contents/Resources/createinstallmedia" --volume /Volumes/install_build --nointeraction
  6. Unmount the volume.
    Note: Check the name first, as volume name changes after the setup. The installation process specifically overwrites the partition table and volume name. hdiutil detach "/Volumes/Install macOS Mojave"
  7. We convert the dmg volume to UDTO compatible ISO standard. hdiutil convert "$ISO_PATH.cdr.dmg" -format UDTO -o "$ISO_PATH"
  8. Then we rename and remove .cdr extension. mv "$ISO_PATH.cdr" "$ISO_PATH"
  9. Finally, we delete all the remnants of the procedure. rm "$ISO_PATH.cdr.dmg"

That’s all the steps needed. If you ever completed it without error then you got yourself a macOS ISO installer.


Hope you guys enjoyed this article!

  1. macOS Mojave is the fifteenth major release of macOS, Apple Inc.’s desktop operating system for Macintosh computers. Mojave was announced at Apple’s Worldwide Developers Conference on June 4, 2018, and was released to the public on September 24, 2018. Wikipedia ↩︎
  2. hdiutil – Manipulate disk images (attach, verify, burn, etc). https://ss64.com/osx/hdiutil.html ↩︎

Running Seeds After Edeliver Deploy

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

— E. James Rohn.

After deploying your application to production or staging server, have you ever wondered on how you can import your seed data. This post is specifically targeted to elixir web apps only.

Assuming you haven’t already started the migration process and migrated all the tables. Go to the built edeliver release folder and run ./bin/my_app_name remote_console to access iex console for this web OTP (Open Telecom Platform) app.

When you’re inside the iex console, enter this command:

|> Path.join("repo/seeds.exs") 
|> Code.require_file()

The command above will be evaluated by the console interpreter and run the seeds file. This would access the file from priv directory and execute seeds.exs. After that, check your database if all the migrations has been executed.

That’s all there is to it guys, check my other post for some additional tips and tricks. Hope you enjoyed this article!

Fixing GTK Dark Themes on Firefox

The world is a comedy to those that think; a tragedy to those that feel.

— Horace Walpole.

If your using Linux and run Firefox1. One thing you will notice on Firefox when on a dark themed GTK2 based environment in Linux is the HTML content would adapt to the theme color.

And for some reason I don’t know why Firefox still doesn’t fix this stuff. Here is the link related to the issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1527048

UPDATE: Seems this problem has been fixed in Version 67 of Firefox.

Here is the workaround for it:

  1. Open about:config inside Firefox. You should type this in the URL bar.
  2. Right click on the content and click New > String with key widget.content.gtk-theme-override and value Arc-Darker.
  3. Restart Firefox.

The steps above would set Firefox content to adapt to white based theme while retaining chroma theme dark. You could also use Adwaita as value.

So guys, have you ever encountered this bug specifically in Gnome 3 while using Firefox? Hope you guys enjoyed this article and as always live life!

  1. Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, Mozilla Corporation. Firefox uses the Gecko layout engine to render web pages, which implements current and anticipated web standards. ↩︎
  2. GTK is a free and open-source cross-platform widget toolkit for creating graphical user interfaces. It is licensed under the terms of the GNU Lesser General Public License, allowing both free and proprietary software to use it. ↩︎

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.


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.