Pages

Saturday, December 29, 2018

Vastushashtra compatible directions drawing for residential home


Tuesday, December 25, 2018

Dart: Flutter Resources

Flutter Resources

Saturday, September 8, 2018

Blink: Once you’ve mastered business, you can become a sophisticated investor

So you’ve started a business, and it’s going well. Now it’s time to use the income and the experience you’ve accumulated and take things to the next level. It’s time to become a sophisticated investor.

As a sophisticated investor, you’ll take more control over management, corporate structure, investment decision making and taxes. The result? Maximized returns.

Let’s look at a restaurant owned by Bill and Jane, two hard-working Americans. They operate as a sole proprietorship, which means that they have one income source. They pay normal, personal income tax and they are liable if anything goes wrong – like a sick customer filing a lawsuit. All their eggs are in one basket.

No disrespect to Bill and Jane, but the sophisticated investor knows better. He would have two corporations: Bill would own the restaurant itself and Jane would own the building it’s in. This way, risk is spread.

If a customer falls sick and sues the restaurant, the real estate is legally separate and protected. Meanwhile, under this corporate structure, expenses like health insurance and legal fees are allocated as business expenses and paid pre-tax. Tax itself is paid at lower, corporate rates – less risk, less tax, more financial return.

Whatever you want to invest in, as a sophisticated investor, you know how to make your money work for you.

An average person’s plan for retirement might consist of squirreling away $15,000 a year in a 401k plan and hoping for an 8-percent return.

The sophisticated investor is more likely to invest in real estate, some stocks and shares and a business venture. With the experience brought by building a business, and by investing in his financial literacy and education, he can make the investment decisions of the rich: spotting the best opportunities, understanding what’s really risky and what isn’t.

The average approach sees you work for your money. The second approach sees your money work for you. Don’t be average.

__
Excerpt from book, "Rich dad's guide to investing" by Robert T. Kiyosaki

Saturday, August 11, 2018

Test: Experiencing the Nexe project


Today I have tried my hands on Nexe. It's an open source project on Github to create a single executable file out of node.js application. So here is my feedback.

After building the node.js based app, we always question about how do we ship it. So basically, Nexe provides a solution for that.

Since it packages together the complete node.js based app and converts the package into single standalone binary file, so that becomes very portable and easy to distribute. Well done guys!

While executing the node.js based app for the first time, Nexe tries to download dependencies that take some time to download. Usually download can only take some time if the file is big or network speed is slow. Since my internet speed was pretty good at that time, so I believe the file must be heavy enough.

Now to make it portable, it must embed the dependencies in the binary file otherwise it can't come out without any external dependencies attached to it. So I assume that it might embeds the node.js app with the generated output file but due to that it blots the generated binary file-size.

Although this is a great initiative but the only thing I'm concerned about this project is the output that it generates because for just 1 line console.log statement it has generated a binary file having 37 MB file-size. Well, that's too much! Isn't it?

Other than the binary output file-size this is a great tool to generate a single binary app.

For your reference, here is the complete log of the steps taken to create and test the output generated by this project.

$ sudo npm i nexe -g
Password:
/usr/local/bin/nexe -> /usr/local/lib/node_modules/nexe/index.js

> fsevents@1.2.4 install /usr/local/lib/node_modules/nexe/node_modules/fsevents
> node install

[fsevents] Success: "/usr/local/lib/node_modules/nexe/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
/usr/local/lib
└─┬ nexe@2.0.0-rc.34 
  ├── app-builder@5.2.0 
  ├─┬ caw@2.0.1 
  │ ├─┬ get-proxy@2.1.0 
  │ │ └─┬ npm-conf@1.1.3 
  │ │   └─┬ config-chain@1.1.11 
  │ │     ├── ini@1.3.5 
  │ │     └── proto-list@1.2.4 
  │ ├─┬ isurl@1.0.0 
  │ │ ├─┬ has-to-string-tag-x@1.4.1 
  │ │ │ └── has-symbol-support-x@1.4.2 
  │ │ └── is-object@1.0.1 
  │ ├── tunnel-agent@0.6.0 
  │ └── url-to-options@1.0.1 
  ├─┬ chalk@1.1.3 
  │ ├── ansi-styles@2.2.1 
  │ ├── escape-string-regexp@1.0.5 
  │ ├─┬ has-ansi@2.0.0 
  │ │ └── ansi-regex@2.1.1 
  │ ├── strip-ansi@3.0.1 
  │ └── supports-color@2.0.0 
  ├─┬ download@6.2.5 
  │ ├── content-disposition@0.5.2 
  │ ├─┬ decompress@4.2.0 
  │ │ ├─┬ decompress-tar@4.1.1 
  │ │ │ └─┬ tar-stream@1.6.1 
  │ │ │   ├── bl@1.2.2 
  │ │ │   ├─┬ buffer-alloc@1.2.0 
  │ │ │   │ ├── buffer-alloc-unsafe@1.1.0 
  │ │ │   │ └── buffer-fill@1.0.0 
  │ │ │   ├── end-of-stream@1.4.1 
  │ │ │   ├── fs-constants@1.0.0 
  │ │ │   ├── to-buffer@1.1.1 
  │ │ │   └── xtend@4.0.1 
  │ │ ├─┬ decompress-tarbz2@4.1.1 
  │ │ │ ├── file-type@6.2.0 
  │ │ │ ├─┬ seek-bzip@1.0.5 
  │ │ │ │ └─┬ commander@2.8.1 
  │ │ │ │   └── graceful-readlink@1.0.1 
  │ │ │ └─┬ unbzip2-stream@1.2.5 
  │ │ │   └─┬ buffer@3.6.0 
  │ │ │     └── base64-js@0.0.8 
  │ │ ├── decompress-targz@4.1.1 
  │ │ ├─┬ decompress-unzip@4.0.1 
  │ │ │ ├── file-type@3.9.0 
  │ │ │ ├── get-stream@2.3.1 
  │ │ │ ├── pify@2.3.0 
  │ │ │ └─┬ yauzl@2.10.0 
  │ │ │   ├── buffer-crc32@0.2.13 
  │ │ │   └─┬ fd-slicer@1.1.0 
  │ │ │     └── pend@1.2.0 
  │ │ ├── graceful-fs@4.1.11 
  │ │ ├── pify@2.3.0 
  │ │ └─┬ strip-dirs@2.1.0 
  │ │   └── is-natural-number@4.0.1 
  │ ├─┬ ext-name@5.0.0 
  │ │ ├─┬ ext-list@2.2.2 
  │ │ │ └── mime-db@1.35.0 
  │ │ └─┬ sort-keys-length@1.0.1 
  │ │   └── sort-keys@1.1.2 
  │ ├── file-type@5.2.0 
  │ ├─┬ filenamify@2.1.0 
  │ │ ├── filename-reserved-regex@2.0.0 
  │ │ ├── strip-outer@1.0.1 
  │ │ └── trim-repeated@1.0.0 
  │ ├── get-stream@3.0.0 
  │ ├─┬ got@7.1.0 
  │ │ ├── is-plain-obj@1.1.0 
  │ │ ├── is-stream@1.1.0 
  │ │ ├── p-cancelable@0.3.0 
  │ │ ├── p-timeout@1.2.1 
  │ │ └─┬ url-parse-lax@1.0.0 
  │ │   └── prepend-http@1.0.4 
  │ ├── make-dir@1.3.0 
  │ └── p-event@1.3.0 
  ├─┬ fuse-box@3.4.0 
  │ ├── acorn@5.7.1 
  │ ├── acorn-jsx@4.1.1 
  │ ├── ansi@0.3.1 
  │ ├── app-root-path@2.1.0 
  │ ├─┬ base64-img@1.0.4 
  │ │ ├─┬ ajax-request@1.2.3 
  │ │ │ └── utils-extend@1.0.8 
  │ │ └─┬ file-system@2.2.2 
  │ │   └── file-match@1.0.2 
  │ ├── base64-js@1.3.0 
  │ ├─┬ chokidar@1.7.0 
  │ │ ├─┬ anymatch@1.3.2 
  │ │ │ ├─┬ micromatch@2.3.11 
  │ │ │ │ ├─┬ arr-diff@2.0.0 
  │ │ │ │ │ └── arr-flatten@1.1.0 
  │ │ │ │ ├── array-unique@0.2.1 
  │ │ │ │ ├─┬ braces@1.8.5 
  │ │ │ │ │ ├─┬ expand-range@1.8.2 
  │ │ │ │ │ │ └─┬ fill-range@2.2.4 
  │ │ │ │ │ │   ├── isobject@2.1.0 
  │ │ │ │ │ │   ├─┬ randomatic@3.1.0 
  │ │ │ │ │ │   │ ├── is-number@4.0.0 
  │ │ │ │ │ │   │ ├── kind-of@6.0.2 
  │ │ │ │ │ │   │ └── math-random@1.0.1 
  │ │ │ │ │ │   └── repeat-string@1.6.1 
  │ │ │ │ │ ├── preserve@0.2.0 
  │ │ │ │ │ └── repeat-element@1.1.2 
  │ │ │ │ ├─┬ expand-brackets@0.1.5 
  │ │ │ │ │ └── is-posix-bracket@0.1.1 
  │ │ │ │ ├── extglob@0.3.2 
  │ │ │ │ ├── filename-regex@2.0.1 
  │ │ │ │ ├─┬ object.omit@2.0.1 
  │ │ │ │ │ ├─┬ for-own@0.1.5 
  │ │ │ │ │ │ └── for-in@1.0.2 
  │ │ │ │ │ └── is-extendable@0.1.1 
  │ │ │ │ ├─┬ parse-glob@3.0.4 
  │ │ │ │ │ ├── glob-base@0.3.0 
  │ │ │ │ │ └── is-dotfile@1.0.3 
  │ │ │ │ └─┬ regex-cache@0.4.4 
  │ │ │ │   └─┬ is-equal-shallow@0.1.3 
  │ │ │ │     └── is-primitive@2.0.0 
  │ │ │ └─┬ normalize-path@2.1.1 
  │ │ │   └── remove-trailing-separator@1.1.0 
  │ │ ├── async-each@1.0.1 
  │ │ ├─┬ fsevents@1.2.4 
  │ │ │ ├── nan@2.10.0 
  │ │ │ └─┬ node-pre-gyp@0.10.0 
  │ │ │   ├── detect-libc@1.0.3 
  │ │ │   ├─┬ mkdirp@0.5.1 
  │ │ │   │ └── minimist@0.0.8 
  │ │ │   ├─┬ needle@2.2.0 
  │ │ │   │ ├─┬ debug@2.6.9 
  │ │ │   │ │ └── ms@2.0.0 
  │ │ │   │ ├─┬ iconv-lite@0.4.21 
  │ │ │   │ │ └── safer-buffer@2.1.2 
  │ │ │   │ └── sax@1.2.4 
  │ │ │   ├─┬ nopt@4.0.1 
  │ │ │   │ ├── abbrev@1.1.1 
  │ │ │   │ └─┬ osenv@0.1.5 
  │ │ │   │   ├── os-homedir@1.0.2 
  │ │ │   │   └── os-tmpdir@1.0.2 
  │ │ │   ├─┬ npm-packlist@1.1.10 
  │ │ │   │ ├─┬ ignore-walk@3.0.1 
  │ │ │   │ │ └─┬ minimatch@3.0.4 
  │ │ │   │ │   └─┬ brace-expansion@1.1.11 
  │ │ │   │ │     ├── balanced-match@1.0.0 
  │ │ │   │ │     └── concat-map@0.0.1 
  │ │ │   │ └── npm-bundled@1.0.3 
  │ │ │   ├─┬ npmlog@4.1.2 
  │ │ │   │ ├─┬ are-we-there-yet@1.1.4 
  │ │ │   │ │ ├── delegates@1.0.0 
  │ │ │   │ │ └─┬ readable-stream@2.3.6 
  │ │ │   │ │   ├── core-util-is@1.0.2 
  │ │ │   │ │   ├── isarray@1.0.0 
  │ │ │   │ │   ├── process-nextick-args@2.0.0 
  │ │ │   │ │   ├── string_decoder@1.1.1 
  │ │ │   │ │   └── util-deprecate@1.0.2 
  │ │ │   │ ├── console-control-strings@1.1.0 
  │ │ │   │ ├─┬ gauge@2.7.4 
  │ │ │   │ │ ├── aproba@1.2.0 
  │ │ │   │ │ ├── has-unicode@2.0.1 
  │ │ │   │ │ ├── object-assign@4.1.1 
  │ │ │   │ │ ├── signal-exit@3.0.2 
  │ │ │   │ │ ├─┬ string-width@1.0.2 
  │ │ │   │ │ │ ├── code-point-at@1.1.0 
  │ │ │   │ │ │ └─┬ is-fullwidth-code-point@1.0.0 
  │ │ │   │ │ │   └── number-is-nan@1.0.1 
  │ │ │   │ │ ├─┬ strip-ansi@3.0.1 
  │ │ │   │ │ │ └── ansi-regex@2.1.1 
  │ │ │   │ │ └── wide-align@1.1.2 
  │ │ │   │ └── set-blocking@2.0.0 
  │ │ │   ├─┬ rc@1.2.7 
  │ │ │   │ ├── deep-extend@0.5.1 
  │ │ │   │ ├── ini@1.3.5 
  │ │ │   │ ├── minimist@1.2.0 
  │ │ │   │ └── strip-json-comments@2.0.1 
  │ │ │   ├─┬ rimraf@2.6.2 
  │ │ │   │ └─┬ glob@7.1.2 
  │ │ │   │   ├── fs.realpath@1.0.0 
  │ │ │   │   ├─┬ inflight@1.0.6 
  │ │ │   │   │ └── wrappy@1.0.2 
  │ │ │   │   ├── inherits@2.0.3 
  │ │ │   │   ├── once@1.4.0 
  │ │ │   │   └── path-is-absolute@1.0.1 
  │ │ │   ├── semver@5.5.0 
  │ │ │   └─┬ tar@4.4.1 
  │ │ │     ├── chownr@1.0.1 
  │ │ │     ├── fs-minipass@1.2.5 
  │ │ │     ├── minipass@2.2.4 
  │ │ │     ├── minizlib@1.1.0 
  │ │ │     ├── safe-buffer@5.1.1 
  │ │ │     └── yallist@3.0.2 
  │ │ ├── glob-parent@2.0.0 
  │ │ ├── inherits@2.0.3 
  │ │ ├─┬ is-binary-path@1.0.1 
  │ │ │ └── binary-extensions@1.11.0 
  │ │ ├─┬ is-glob@2.0.1 
  │ │ │ └── is-extglob@1.0.0 
  │ │ ├── path-is-absolute@1.0.1 
  │ │ └─┬ readdirp@2.1.0 
  │ │   ├─┬ readable-stream@2.3.6 
  │ │   │ ├── core-util-is@1.0.2 
  │ │   │ ├── isarray@1.0.0 
  │ │   │ ├── process-nextick-args@2.0.0 
  │ │   │ ├── string_decoder@1.1.1 
  │ │   │ └── util-deprecate@1.0.2 
  │ │   └── set-immediate-shim@1.0.1 
  │ ├─┬ clean-css@4.2.1 
  │ │ └── source-map@0.6.1 
  │ ├─┬ escodegen@1.11.0 
  │ │ ├── esprima@3.1.3 
  │ │ ├── estraverse@4.2.0 
  │ │ ├── esutils@2.0.2 
  │ │ ├─┬ optionator@0.8.2 
  │ │ │ ├── deep-is@0.1.3 
  │ │ │ ├── fast-levenshtein@2.0.6 
  │ │ │ ├── levn@0.3.0 
  │ │ │ ├── prelude-ls@1.1.2 
  │ │ │ ├── type-check@0.3.2 
  │ │ │ └── wordwrap@1.0.0 
  │ │ └── source-map@0.6.1 
  │ ├─┬ express@4.16.3 
  │ │ ├─┬ accepts@1.3.5 
  │ │ │ └── negotiator@0.6.1 
  │ │ ├── array-flatten@1.1.1 
  │ │ ├─┬ body-parser@1.18.2 
  │ │ │ ├── bytes@3.0.0 
  │ │ │ ├── http-errors@1.6.3 
  │ │ │ ├── iconv-lite@0.4.19 
  │ │ │ └─┬ raw-body@2.3.2 
  │ │ │   └─┬ http-errors@1.6.2 
  │ │ │     ├── depd@1.1.1 
  │ │ │     └── setprototypeof@1.0.3 
  │ │ ├── content-type@1.0.4 
  │ │ ├── cookie@0.3.1 
  │ │ ├── cookie-signature@1.0.6 
  │ │ ├─┬ debug@2.6.9 
  │ │ │ └── ms@2.0.0 
  │ │ ├── depd@1.1.2 
  │ │ ├── encodeurl@1.0.2 
  │ │ ├── escape-html@1.0.3 
  │ │ ├── etag@1.8.1 
  │ │ ├─┬ finalhandler@1.1.1 
  │ │ │ └── unpipe@1.0.0 
  │ │ ├── fresh@0.5.2 
  │ │ ├── merge-descriptors@1.0.1 
  │ │ ├── methods@1.1.2 
  │ │ ├─┬ on-finished@2.3.0 
  │ │ │ └── ee-first@1.1.1 
  │ │ ├── parseurl@1.3.2 
  │ │ ├── path-to-regexp@0.1.7 
  │ │ ├─┬ proxy-addr@2.0.4 
  │ │ │ ├── forwarded@0.1.2 
  │ │ │ └── ipaddr.js@1.8.0 
  │ │ ├── qs@6.5.1 
  │ │ ├── range-parser@1.2.0 
  │ │ ├── safe-buffer@5.1.1 
  │ │ ├─┬ send@0.16.2 
  │ │ │ ├── destroy@1.0.4 
  │ │ │ └── mime@1.4.1 
  │ │ ├── serve-static@1.13.2 
  │ │ ├── setprototypeof@1.1.0 
  │ │ ├── statuses@1.4.0 
  │ │ ├─┬ type-is@1.6.16 
  │ │ │ └── media-typer@0.3.0 
  │ │ ├── utils-merge@1.0.1 
  │ │ └── vary@1.1.2 
  │ ├─┬ fliplog@0.3.13 
  │ │ └── chain-able@1.0.1 
  │ ├─┬ fs-extra@2.1.2 
  │ │ └── jsonfile@2.4.0 
  │ ├─┬ fuse-concat-with-sourcemaps@1.0.5 
  │ │ └── source-map@0.6.1 
  │ ├─┬ glob@7.1.2 
  │ │ ├── fs.realpath@1.0.0 
  │ │ ├─┬ inflight@1.0.6 
  │ │ │ └── wrappy@1.0.2 
  │ │ ├─┬ minimatch@3.0.4 
  │ │ │ └─┬ brace-expansion@1.1.11 
  │ │ │   ├── balanced-match@1.0.0 
  │ │ │   └── concat-map@0.0.1 
  │ │ └── once@1.4.0 
  │ ├── ieee754@1.1.12 
  │ ├─┬ inquirer@3.3.0 
  │ │ ├── ansi-escapes@3.1.0 
  │ │ ├─┬ chalk@2.4.1 
  │ │ │ ├── ansi-styles@3.2.1 
  │ │ │ └── supports-color@5.4.0 
  │ │ ├── cli-width@2.2.0 
  │ │ ├─┬ external-editor@2.2.0 
  │ │ │ ├── chardet@0.4.2 
  │ │ │ └─┬ tmp@0.0.33 
  │ │ │   └── os-tmpdir@1.0.2 
  │ │ ├── figures@2.0.0 
  │ │ ├── lodash@4.17.10 
  │ │ ├── mute-stream@0.0.7 
  │ │ ├─┬ run-async@2.3.0 
  │ │ │ └── is-promise@2.1.0 
  │ │ ├── rx-lite@4.0.8 
  │ │ ├── rx-lite-aggregates@4.0.8 
  │ │ ├─┬ string-width@2.1.1 
  │ │ │ ├── is-fullwidth-code-point@2.0.0 
  │ │ │ └─┬ strip-ansi@4.0.0 
  │ │ │   └── ansi-regex@3.0.0 
  │ │ ├─┬ strip-ansi@4.0.0 
  │ │ │ └── ansi-regex@3.0.0 
  │ │ └── through@2.3.8 
  │ ├─┬ lego-api@1.0.8 
  │ │ └── chain-able@3.0.0 
  │ ├── mustache@2.3.1 
  │ ├─┬ postcss@6.0.23 
  │ │ ├─┬ chalk@2.4.1 
  │ │ │ └── ansi-styles@3.2.1 
  │ │ ├── source-map@0.6.1 
  │ │ └─┬ supports-color@5.4.0 
  │ │   └── has-flag@3.0.0 
  │ ├─┬ pretty-time@0.2.0 
  │ │ ├─┬ is-number@2.1.0 
  │ │ │ └─┬ kind-of@3.2.2 
  │ │ │   └── is-buffer@1.1.6 
  │ │ └── nanoseconds@0.1.0 
  │ ├── prettysize@0.0.3 
  │ ├─┬ realm-utils@1.0.9 
  │ │ └── app-root-path@1.4.0 
  │ ├─┬ regexpu-core@4.2.0 
  │ │ ├── regenerate@1.4.0 
  │ │ ├── regenerate-unicode-properties@7.0.0 
  │ │ ├── regjsgen@0.4.0 
  │ │ ├─┬ regjsparser@0.3.0 
  │ │ │ └── jsesc@0.5.0 
  │ │ ├─┬ unicode-match-property-ecmascript@1.0.4 
  │ │ │ ├── unicode-canonical-property-names-ecmascript@1.0.4 
  │ │ │ └── unicode-property-aliases-ecmascript@1.0.4 
  │ │ └── unicode-match-property-value-ecmascript@1.0.2 
  │ ├─┬ request@2.87.0 
  │ │ ├── aws-sign2@0.7.0 
  │ │ ├── aws4@1.8.0 
  │ │ ├── caseless@0.12.0 
  │ │ ├─┬ combined-stream@1.0.6 
  │ │ │ └── delayed-stream@1.0.0 
  │ │ ├── extend@3.0.2 
  │ │ ├── forever-agent@0.6.1 
  │ │ ├─┬ form-data@2.3.2 
  │ │ │ └── asynckit@0.4.0 
  │ │ ├─┬ har-validator@5.0.3 
  │ │ │ ├─┬ ajv@5.5.2 
  │ │ │ │ ├── co@4.6.0 
  │ │ │ │ ├── fast-deep-equal@1.1.0 
  │ │ │ │ ├── fast-json-stable-stringify@2.0.0 
  │ │ │ │ └── json-schema-traverse@0.3.1 
  │ │ │ └── har-schema@2.0.0 
  │ │ ├─┬ http-signature@1.2.0 
  │ │ │ ├── assert-plus@1.0.0 
  │ │ │ ├─┬ jsprim@1.4.1 
  │ │ │ │ ├── extsprintf@1.3.0 
  │ │ │ │ ├── json-schema@0.2.3 
  │ │ │ │ └── verror@1.10.0 
  │ │ │ └─┬ sshpk@1.14.2 
  │ │ │   ├── asn1@0.2.4 
  │ │ │   ├── bcrypt-pbkdf@1.0.2 
  │ │ │   ├── dashdash@1.14.1 
  │ │ │   ├── ecc-jsbn@0.1.2 
  │ │ │   ├── getpass@0.1.7 
  │ │ │   ├── jsbn@0.1.1 
  │ │ │   ├── safer-buffer@2.1.2 
  │ │ │   └── tweetnacl@0.14.5 
  │ │ ├── is-typedarray@1.0.0 
  │ │ ├── isstream@0.1.2 
  │ │ ├── json-stringify-safe@5.0.1 
  │ │ ├── mime-types@2.1.19 
  │ │ ├── oauth-sign@0.8.2 
  │ │ ├── performance-now@2.1.0 
  │ │ ├─┬ tough-cookie@2.3.4 
  │ │ │ └── punycode@1.4.1 
  │ │ └── uuid@3.3.2 
  │ ├── shorthash@0.0.2 
  │ ├── source-map@0.7.3 
  │ ├── tslib@1.9.3 
  │ ├─┬ watch@1.0.2 
  │ │ └─┬ exec-sh@0.2.2 
  │ │   └── merge@1.2.0 
  │ ├─┬ ws@1.1.5 
  │ │ ├── options@0.0.6 
  │ │ └── ultron@1.0.2 
  │ └─┬ yargs@9.0.1 
  │   ├── camelcase@4.1.0 
  │   ├─┬ cliui@3.2.0 
  │   │ ├─┬ string-width@1.0.2 
  │   │ │ ├── code-point-at@1.1.0 
  │   │ │ └─┬ is-fullwidth-code-point@1.0.0 
  │   │ │   └── number-is-nan@1.0.1 
  │   │ └─┬ wrap-ansi@2.1.0 
  │   │   └─┬ string-width@1.0.2 
  │   │     └── is-fullwidth-code-point@1.0.0 
  │   ├── decamelize@1.2.0 
  │   ├── get-caller-file@1.0.3 
  │   ├─┬ os-locale@2.1.0 
  │   │ ├─┬ execa@0.7.0 
  │   │ │ ├─┬ cross-spawn@5.1.0 
  │   │ │ │ ├─┬ lru-cache@4.1.3 
  │   │ │ │ │ ├── pseudomap@1.0.2 
  │   │ │ │ │ └── yallist@2.1.2 
  │   │ │ │ ├─┬ shebang-command@1.2.0 
  │   │ │ │ │ └── shebang-regex@1.0.0 
  │   │ │ │ └─┬ which@1.3.1 
  │   │ │ │   └── isexe@2.0.0 
  │   │ │ ├─┬ npm-run-path@2.0.2 
  │   │ │ │ └── path-key@2.0.1 
  │   │ │ └── strip-eof@1.0.0 
  │   │ ├─┬ lcid@1.0.0 
  │   │ │ └── invert-kv@1.0.0 
  │   │ └─┬ mem@1.1.0 
  │   │   └── mimic-fn@1.2.0 
  │   ├─┬ read-pkg-up@2.0.0 
  │   │ ├─┬ find-up@2.1.0 
  │   │ │ └─┬ locate-path@2.0.0 
  │   │ │   ├─┬ p-locate@2.0.0 
  │   │ │   │ └─┬ p-limit@1.3.0 
  │   │ │   │   └── p-try@1.0.0 
  │   │ │   └── path-exists@3.0.0 
  │   │ └─┬ read-pkg@2.0.0 
  │   │   ├─┬ load-json-file@2.0.0 
  │   │   │ ├─┬ parse-json@2.2.0 
  │   │   │ │ └─┬ error-ex@1.3.2 
  │   │   │ │   └── is-arrayish@0.2.1 
  │   │   │ ├── pify@2.3.0 
  │   │   │ └── strip-bom@3.0.0 
  │   │   ├─┬ normalize-package-data@2.4.0 
  │   │   │ ├── hosted-git-info@2.7.1 
  │   │   │ ├─┬ is-builtin-module@1.0.0 
  │   │   │ │ └── builtin-modules@1.1.1 
  │   │   │ ├── semver@5.5.0 
  │   │   │ └─┬ validate-npm-package-license@3.0.4 
  │   │   │   ├─┬ spdx-correct@3.0.0 
  │   │   │   │ └── spdx-license-ids@3.0.0 
  │   │   │   └─┬ spdx-expression-parse@3.0.0 
  │   │   │     └── spdx-exceptions@2.1.0 
  │   │   └─┬ path-type@2.0.0 
  │   │     └── pify@2.3.0 
  │   ├── require-directory@2.1.1 
  │   ├── require-main-filename@1.0.1 
  │   ├── set-blocking@2.0.0 
  │   ├── which-module@2.0.0 
  │   ├── y18n@3.2.1 
  │   └── yargs-parser@7.0.0 
  ├─┬ globby@6.1.0 
  │ ├─┬ array-union@1.0.2 
  │ │ └── array-uniq@1.0.3 
  │ ├── object-assign@4.1.1 
  │ ├── pify@2.3.0 
  │ └─┬ pinkie-promise@2.0.1 
  │   └── pinkie@2.0.4 
  ├─┬ got@8.3.2 
  │ ├── @sindresorhus/is@0.7.0 
  │ ├─┬ cacheable-request@2.1.4 
  │ │ ├── clone-response@1.0.2 
  │ │ ├── http-cache-semantics@3.8.1 
  │ │ ├─┬ keyv@3.0.0 
  │ │ │ └── json-buffer@3.0.0 
  │ │ ├── lowercase-keys@1.0.0 
  │ │ ├─┬ normalize-url@2.0.1 
  │ │ │ ├── prepend-http@2.0.0 
  │ │ │ ├─┬ query-string@5.1.1 
  │ │ │ │ ├── decode-uri-component@0.2.0 
  │ │ │ │ └── strict-uri-encode@1.1.0 
  │ │ │ └── sort-keys@2.0.0 
  │ │ └── responselike@1.0.2 
  │ ├── decompress-response@3.3.0 
  │ ├── duplexer3@0.1.4 
  │ ├─┬ into-stream@3.1.0 
  │ │ ├── from2@2.3.0 
  │ │ └── p-is-promise@1.1.0 
  │ ├── is-retry-allowed@1.1.0 
  │ ├── lowercase-keys@1.0.1 
  │ ├── mimic-response@1.0.1 
  │ ├── p-cancelable@0.4.1 
  │ ├─┬ p-timeout@2.0.1 
  │ │ └── p-finally@1.0.0 
  │ ├── safe-buffer@5.1.2 
  │ ├── timed-out@4.0.1 
  │ └─┬ url-parse-lax@3.0.0 
  │   └── prepend-http@2.0.0 
  ├── minimist@1.2.0 
  ├─┬ mkdirp@0.5.1 
  │ └── minimist@0.0.8 
  ├─┬ ora@1.4.0 
  │ ├─┬ chalk@2.4.1 
  │ │ ├─┬ ansi-styles@3.2.1 
  │ │ │ └─┬ color-convert@1.9.2 
  │ │ │   └── color-name@1.1.1 
  │ │ └── supports-color@5.4.0 
  │ ├─┬ cli-cursor@2.1.0 
  │ │ └─┬ restore-cursor@2.0.0 
  │ │   ├── onetime@2.0.1 
  │ │   └── signal-exit@3.0.2 
  │ ├── cli-spinners@1.3.1 
  │ └─┬ log-symbols@2.2.0 
  │   └─┬ chalk@2.4.1 
  │     ├── ansi-styles@3.2.1 
  │     └── supports-color@5.4.0 
  ├── pify@3.0.0 
  ├── rimraf@2.6.2 
  ├── typescript@2.5.3 
  ├─┬ uglify-es@3.3.9 
  │ ├── commander@2.13.0 
  │ └── source-map@0.6.1 
  └─┬ uglify-js@3.0.28 
    ├── commander@2.11.0 
    └── source-map@0.5.7 

$ mkdir test-nexe
$ cd test-nexe
$ ls
$ cat > test1.js
console.log('Hello World', process.version)
^Z
[1]+  Stopped                 cat > test1.js
$ ls
test1.js
$ nexe -v
2.0.0-rc.34
$ nexe -h

nexe  [options]

   Options:

  -i   --input                      -- application entry point
  -o   --output                     -- path to output file
  -t   --target                     -- node version description
  -n   --name                       -- main app module name
  -r   --resource                   -- *embed files (glob) within the binary
       --plugin                     -- extend nexe runtime behavior

   Building from source:

  -b   --build                      -- build from source
  -p   --python                     -- python2 (as python) executable path
  -f   --flag                       -- *v8 flags to include during compilation
  -c   --configure                  -- *arguments to the configure step
  -m   --make                       -- *arguments to the make/build step
       --snapshot                   -- path to a warmup snapshot
       --ico                        -- file name for alternate icon file (windows)
       --rc-*                       -- populate rc file options (windows)
       --sourceUrl                  -- pass an alternate source (node.tar.gz) url
       --enableNodeCli              -- enable node cli enforcement (blocks app cli)

   Other options:

       --bundle                     -- custom bundling module with 'createBundle' export
       --temp                       -- temp file storage default '~/.nexe'
       --cwd                        -- set the current working directory for the command
       --fake-argv                  -- fake argv[1] with entry file
       --clean                      -- force download of sources
       --silent                     -- disable logging
       --verbose                    -- set logging to verbose

       -* variable key name         * option can be used more than once

$ nexe ./test1.js
ℹ nexe 2.0.0-rc.34
✔ Downloading...100%
✔ Entry: 'test1.js' written to: test1
✔ Finished in 446.741s
$ ls
test1  test1.js
$ ./test1 
Hello World v10.4.1
$ ls
test1  test1.js
$ ls -l
.rwxr-xr-x 37M abhishekkumar 11 Aug 10:18 test1
.rw-r--r--  44 abhishekkumar 10 Aug 20:53 test1.js
$ 

Thursday, July 19, 2018

Blink: Computer programmers used to be women

Computer programmers used to be women until a report in the 1960s changed everything.

What does a typical computer programmer look like? The first image that comes to mind is probably a nerdy-looking man who’s terrible in social situations but excellent at dealing with numbers. This stereotype, however, is in massive contrast to the reality of the early days of computing.

During the first part of the twentieth century, working with computers was considered a clerical job – like typing or operating a switchboard – and thus deemed “women’s work.” In other words, the first computer programmers were women.

In fact, the first program for a computer was written by Ada Lovelace in 1840.

It should come as no surprise to learn that women programmed the first computer for the US Army during WWII. Or that rear admiral Grace Hopper – who held a PhD in mathematics – programmed Mark I, a computer at Harvard University which helped in the development of the atomic bombs that would be dropped on Japan in 1945.

Another thing that many people don’t know is that astronaut John Glenn’s successful orbit of the earth in 1962 was made possible by the work of three female NASA mathematicians. The lack of recognition for their contribution inspired the 2016 film Hidden Figures.

Then, in 1967, an article titled “The Computer Girls” was published in Cosmopolitan magazine. The piece contained an interview with Hopper, who compared programming to organizing a dinner party. She said that women made good programmers because of their patience and attention to detail.

But sometime in the 1960s came a report that claimed men were better suited to programming.

Unsurprisingly, the report was written by two men, psychologists William Cannon and Dallis Perry, who were hired by a software company to characterize the perfect computer programmer. Of the 1,378 programmers they interviewed, only 186 were female. After their research, Cannon and Perry concluded one key trait was that they “didn’t like people.” By connecting good programming skills with antisocial behavior and introversion, the ideal employee was more likely to be male on account of men being three times more likely to receive the diagnosis of antisocial personality disorder.

Since the release of that report, the industry was persuaded to hire antisocial men. Their dominance in the field has led to the false assumption that the majority of programmers should be men.

__
Snippet taken from a book named "Brotopia" by Emily Chang

Friday, June 29, 2018

Bash: How to uninstall custom go package via shell script?


The Go command line tool do not provide package cleaning option. At max it can remove object files and cached files which will remove executable file from bin folder and from pkg folder. But the source files would still be there.

So if you want to completely remove the package then you have to do it manually. Otherwise, create your own script to do this.  Alternatively, you can use below script. Just put it somewhere so that it could be globally accessible.

Here is a shell script that can completely clean the go package that you have installed by using go get <package> command.

File: goclean.sh

#!/bin/env bash

goclean() {
    local pkg=$1; shift || return 1
    local ost
    local cnt
    local scr

    echo "Clean removes object files from package source directories (ignore error)"
    go clean -i $pkg

    echo "Set local variables"
    if [ "$(uname -m)" == "x86_64" ]; then
        ost="$(uname)";
        ost="${ost}_amd64"
        cnt="${pkg//[^\/]}"
    fi

    echo "Delete the source directory and compiled package directory(ies)"
    if (("${#cnt}" == "2")); then
        rm -rf "${GOPATH%%:*}/src/${pkg%/*}"
        rm -rf "${GOPATH%%:*}/pkg/${ost}/${pkg%/*}"
    elif (("${#cnt}" > "2")); then
        rm -rf "${GOPATH%%:*}/src/${pkg%/*/*}"
        rm -rf "${GOPATH%%:*}/pkg/${ost}/${pkg%/*/*}"
    fi

    echo "Reload the current shell"
    if [ -e "~/.bashrc" ]; then 
        source ~/.bashrc
    elif [ -e "~/.bash_profile" ]; then 
        source ~/.bash_profile
    fi
}

if [[ "$1" == "" ]]; then 
    echo "Package name is missing!"
else 
    goclean $1
fi

exit 0

Usage

Save it in file named goclean.sh.

$ sh goclean.sh github.com/danwakefield/gosh

Alternatively, you can save it without extension as well like goclean. It would become more useful, if you would convert it into self-executable file.

$ chmod +x ./goclean 
$ goclean github.com/danwakefield/gosh

References

Originally, I found this code at stackoverflow.com provided by ecwpz91 but that didn't worked properly on my MacOS. So I have tweaked it a little bit to suite my machine.

If you're using MacOS then it would work like charm but I haven't tried it on any Linux machine. So guys, if you find it working properly at Linux then let the readers know about it in Comment section of this article.

Thursday, June 7, 2018

Blink: Eight factors will combine to create the first trillion-dollar company.

The Four Horsemen – Amazon, Apple, Facebook and Google – dominate not only our online experience but the whole corporate world. The Four have become the world’s most valuable companies. They’ve reached their success by appealing to our deep human desires while also engaging in some questionable practices. And while there’s no doubt they’ll be around for a while, at some point, one of Four might disappear, or a fifth horseman might arise. In the meantime, it’s best to learn how to thrive in the world they’ve created.

The Four Horsemen dominate the world today. But might a fifth horseman emerge and unsaddle these other riders?

If that were to happen, this fifth horseman could well become the first company with a market valuation of $1 trillion.

According to the author, there are eight attributes that a fifth horseman would need to possess in order to become the first trillion-dollar company. Since “trillion” is the key word, he calls these combined attributes the T Algorithm.

First is product differentiation. Each of the Four offer a superior product – Apple has the iPhone; Amazon can deliver within hours – so a challenging horseman would need a comparably superior product.

Second is visionary capital. The Four all offer a compelling vision for the future – and it’s this vision that attracts investors. Google, for instance, strives to organize all the information in the world, while Facebook wants to connect everyone on earth.

Third is global reach. A trillion-dollar company needs a product that can reach anyone, anywhere. So it will probably have to be at least partially digital.

Fourth is likability. In order to avoid regulatory intervention, the fifth horseman would need a very positive image. Right now, the Four aren’t looking as benign as they once did, and this is the main chink in their armor.

Fifth is vertical integration. For a company to be vertical, it must control different stages in both the production and distribution of its product. The Four all do this.

Sixth is artificial intelligence. The Four are data experts; they collect as much data as possible and, in the process, make their algorithms as smart as possible.

Seventh is accelerant. In order to attract top talent, a fifth horseman would need to be perceived as a company that could accelerate a person’s career.

And eighth is geography. Each of the Four is situated near a prestigious university – Stanford, UC Berkeley, the University of Washington – and they each have cultivated a good relationship with their neighboring academic institution. This allows them to recruit the best and brightest.

__
The above excerpt has been taken from The Four book authored by Scott Galloway.

Tuesday, January 30, 2018

Ved: We are living in Dwaparyuga and moving towards Tretayuga in 64 years



As per Sadhguru the duration of yugas are
  • Satyuga: 5184 years 
  • Tretayuga: 3888 years 
  • Dwaparyuga: 2592 years 
  • Kaliyuga: 1296 years

Since the Kaliyuga began after Lord Krishna's death that happened in 3102 BC. So Kaliyuga would be on peak at 1296 years after that, i.e., 1806 BC. After which it might declined and ended in 510 BC.

From there onward, Dwaparyuga began which is still going on and will end in 2082 AD, i.e., after 64 years from now.

Now I found it strange that nothing great is recorded in the duration of 3102-510 BC. In fact, researchers are suggesting that lot many natural calamities happened exactly 3800 years ago. Ironically that was the peak of Kaliyuga (Waxing crescent).

Although after the Kaliyuga (Waning crescent) in 510 BC, we heard about Alexandar The Great (356 to 323 BC), Chandragupta Maurya (321 to 298 BC), Ashoka the Great (268 to 232 BC), Jesus Christ (4 BC to 36 AD), etc.

All of them have contributed a lot and almost placed the foundation of the Dwaparyuga (Waning crescent).