Preslav's Thoughts and Ramblings

Recent Posts

  • 26 March 2017

    Debugging Network Calls in React Native Using the Chrome Debugger

    TL;DR! Just give me the code In your index.js file (or your platform-specific index file for that matter), simply add the following line to the top, directly after the import statements: XMLHttpRequest = GLOBAL.originalXMLHttpRequest ? GLOBAL.originalXMLHttpRequest : GLOBAL.XMLHttpRequest; You will also need a Chrome plugin that overrides CORS. I use CORS Toggle. You may also decide to skip the plugin and start Chrome with CORS disabled: chrome --disable-web-security then, as usually, star...

  • 06 March 2017

    New Mini Project: Kotlin Project Generator

    Over the weekend, I started a new mini project of sorts. I needed a generator for small Kotlin projects, which would come with a simple Gradle build file and could provide different dependencies, based on my choice. As a Java developer, one way to look at this would be to use Maven's archetypes feature. Instead, I decided to go for a slightly more hip approach and chose Yeoman. Yeoman is a project generation framework on steroids written entirely in JavaScript and mimicking much of the helpful f...

  • 26 February 2017

    Dealing with Python-Version Exceptions When Using node-gyp

    I was trying to install a JavaScript library called numjs (basically, a JS equivalent to numpy), when I got the following exception: # Executing the following command... $ npm install numjs --save # resulted in ... gyp ERR! UNCAUGHT EXCEPTION gyp ERR! stack Error: spawn EACCES gyp ERR! stack at exports._errnoException (util.js:1028:11) gyp ERR! stack at ChildProcess.spawn (internal/child_process.js:313:11) gyp ERR! stack at exports.spawn (child_process.js:387:9) gyp ERR! st...

  • 24 February 2017

    The Simple Advice to Mastering Reading, Running, and Just About Anything in Life

    I am a voracious reader, and by reading, I mean, reading real books. Lots of books. A week ago, I ended up discussing the benefits of reading with some guys I know, trying to convince them to pack more books per year. By saying this, by no means do I mean we read less in quantity. We just read less attentively. Combine the pace of the fast modern world, with the variety of information that surrounds us, and you end up with an attention span as short as mere seconds. As I have already mentioned...

  • 03 February 2017

    Securing Your ElasticSearch Instances

    And keeping all the fun Often, we choose convenience over security. Many modern tools such as MongoDB and ElasticSearch, have grown in popularity, partly because of their easy-to-set-up-and-tinker-with nature. Just spin off an instance, point your browser to the right URL and you're ready to start sending queries. Unfortunately, one thing comes for another, and as we have recently seen, ElasticSearch left in the open can be a vulnerable target, same as MongoDB was in its heyday. In light of the...