/notepad

A notepad to store some text.

Primary LanguageHTML

Documents

Magic Commands

  • sudo lsof -i tcp:3000
  • babel src --out-dir lib

Node JS

  1. Trace UnhandledPromiseRejectionWarning

    process.on('unhandledRejection', (reason, p) => {
      console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
      // application specific logging, throwing an error, or other logic here
    })
    

Links

React

JavaScript

iOS Drawing

iOS AV

NLP

Python

  • Python 2 Doc & Source Code

  • MUST WATCH - Pragmatic Unicode, or, How do I stop the pain?

  • Original blog post of the above video

  • Another useful function: urllib.quote().

    When you are making HTTP requests, if the uri contains special character like ć, say http://dbpedia.org/data/Mileva Marić.json, use urlib.quote() to replace special characters with "%xx". If you do this, you will be sending your request to http://dbpedia.org/data/Mileva%20Mari%C4%87.json, great; if you don't do this, the requesting uri will be http://dbpedia.org/data/Mileva Mari\xc4\x87.json or http://dbpedia.org/data/Mileva Mari\u0107.json, and you are fucked. :)

CSS

Other

<iframe src="https://mars.jpl.nasa.gov/participate/send-your-name/insight/?action=getcert&e=1&pid=3&cn=732003331119&" width="750" height="307" scrolling="no" frameborder="0"></iframe> <iframe src="https://mars.jpl.nasa.gov/participate/send-your-name/insight/?action=getcert&e=1&pid=3&cn=125003331230&" width="750" height="307" scrolling="no" frameborder="0"></iframe>