Notes and anecdotes

Techstuff rambling

Creating a Google Chrome Extension

I’ve heard multiple say that creating a chrome extension is about as easy as creating a static web page. Is it really? Here’s a step-by-step on how I created my first Trello-integrated chrome extension, almost like a simple and developer-friendly version of Momentum.

Access Google Analytics API with OAuth token

Notes on adding a Google Service worker that enables you to query Google Analytics with an access token.

ES6 notes

A summary of the key takeaways from CodeSchools “ES2015: The Shape of JavaScript to Come”.

Javascripts var, let, and const

Remember var from the ES5 and previously? It had this weird thing, where JavaScript would move the declaration to the top of the function behind the scenes, called hoisting. Usually no one noticed, but once in a while it would create a bug that could be hard to spot.

Converting SVG to PNG with Javascript cross browser

I promise I tried to do it with client-side Javascript only. And I promise I won’t try again before 2020. Google returns so many optimistic answers, that on the bottom has a disclaimer: “This does not work with Safari”, or “This crashes IE9”, or just no disclaimer. But don’t believe  them: It can’t be done. JUST…

Continue Reading

Profiling JavaScript in Chrome Developer Tools

Open devtools Select Profiles Select Collect JavaScript CPU Profile Click Start Do the (typically slow) things you wish to record Click Stop You now got a table of functions, and CPU time they consumed. On the right hand side of the table, you got a link to the js file and its line number of the function that is…

Continue Reading

Sending and receiving JSON over Bluetooth

I’m new to the whole Bluetooth communication game, but in my case I’ve run into having to communicate using 8-bit usigned integer arrays (I’ve used Cordova libraries to communicate with Arduino chips). In order to do this I’ve had to convert from and to JSON structures on the Cordova side. I’ve done this with the…

Continue Reading

Using FreshDesk API

After starting to write this note, I realize Freshdesk have ridiculously good guides on this. This page does not serve much purpose except this link, as well as this link to JavaScript Freshdesk API repo. How to use Freshdesk API 1. Get your API-key It’s on your profile settings pane (click on your profile picture). The actions done with that API-key,…

Continue Reading