Notes and anecdotes

Techstuff rambling

Quick http benchmarking with curl

From time to time, I’d like to see how the performance gain/loss was after a code change. Say I’ve updated locahost:8000/search and I’d like to do 100 http calls to localhost:8000/search?q=fish to see how it performs:

What skills does an it consultant need?

1. What skills are expected (or most valued/needed) from a person working as a software developer in your company? – Technical experience. Understanding of a techincal area is not expected, but highly valued. But everyone needs some level of understanding about programming, databases etc. – Eagerness about developing. You should be self-propelled: finding solutions and…

Continue Reading

How to add Web App Manifest

The manifest.json for web apps can make your mobile experience a bit sweeter. Force rotation? Check! Home screen icon? Check! Splash loading screen and no url bar? Check, check! Amount of work? 5 minutes!

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.

Getting started with Hubot + Slack

If Custom Slash commands weren’t enough for you, or if you are trapped behind a firewall without the option to make public endpoints, bots are a great way to make custom integrations with Slack. Anything you can program is doable to integrate with Slack, let me show you and get you started.

"GraphQL: Designing a Data Language" by Lee Byron on Strangeloop

Notes on GraphQL

A few notes on “GraphQL: Designing a Data Language” by Lee Byron. 

Porting a React app to Phonegap

If you already have a React web app, and consider porting it to a proper phone app, you should consider using React Native. However, you could also use PhoneGap/Cordova, which is done in a heartbeat: How?

Parallax. CSS it, please.

Parallax is hot. But in so many implementations, it’s not. Because it’s implemented shittily. Parallax shouldn’t be done with Javascript, because then it might end up like this: so laggy it breaks my heart. It should be done with CSS. Jsfiddle  

Center content in HTML mails for OWA

Edit: Stop what your doing. It’s hurting, I know. Go read The Easy Way of Sending Newsletter Emails. Outlook Web App is horrible. Lead me to write <html> <body> <table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″><tr><td align=”center”> <!– This is your container, you can shrink this if you want, but it’s not recommended to go over…

Continue Reading

Reverse trackpack scrolling direction on Windows 8

Easy. See

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

Fresh Macbook and a set of neat tools

I recently bought a Macbook Pro Retina (Late 2014) with 128 GB of storage. I thought that if I needed 256 GB, I could just buy a regular SSD and swap them. Turns out i can’t. Or.. I can, but it’s a special SSD that costs a third of a new Mac. And I just…

Continue Reading

7 ineffective coding habits

Notes from Seven Ineffective Coding Habits of Many Programmers by Kevlin Henney 1. We clutter our code (with comments) Comments are ignored by the compiler. They are also ignored by programmers. So who’s the audience? Reading comments is like a sign of defeat, so it might be useful if your code is uncomprehensable in the first place. But then,…

Continue Reading

Clean Code III: Functions

This post is an my interpretation of the teachings in Robert C. Martins Clean Code III: Functions. Functions should do one thing You can tell that a function is doing more than one thing if you can extract a function from it with a meaningful name that is not merely a restatement of its implementation. Make…

Continue Reading

Track custom events with google analytics

Requirements: You have an existing google analytics account You have a webpage to track events with How: Edit: If you’re on ES6 with webpack or similar, checkout this Github Gist instead. 1. You include google analytics in your page (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,’script’,’//’,’ga’); // Replace UA-XXXXXXX-X with your google analytics user key ga(‘create’, ‘UA-XXXXXXX-X’, ‘’);…

Continue Reading

Web Icon Fonts

So you want font-icons for your page? How about icomoon? How about font awesome? How about glyphicons? How about entypo?

SFTP in Finder

OK, so here’s the thing. I use a Mac and I edit files located on a server somewhere on the Internet. I want to have the files and folders on that server mounted in Finder, so I can easily navigate and edit those files without having to up- and download files manually. Since I don’t…

Continue Reading

Alfred for Windows

Jeg har brukt Mac i ett år nå, og hele veien elsket applikasjonen Alfred. Alfred er en rask og kraftig launcher som erstatter Mac sin spotlight (ala Windows sin Startmeny-søkefunksjon). Men Alfred finnes ikke på Windows, så hvorfor ikke lage den? Jeg misliker sterkt å bruke tid i Finder. Finder er fælt. Det er forøvrig…

Continue Reading

Humørteste sosiale medier

Hvordan kan man hente ut humøret eller følelser fra store datamengder? Hva kan dataen brukes til? Å forstå språk er en stor utfordring innen kunstig intelligens. Det er flere grunner til dette. Tvetydigheten av ord, ulik uttalelse og tonefall, ironi. Barn trenger årevis av intensiv læring for å beherske et språk. Selv en voksen nordmann…

Continue Reading

Chrome-addon: statistics

Hvor mange timer bruker du på hvilke nettsider? Fordeler og ulemper – Begrenset nytteverdi – Ikke noe nytt: Time tracker, Time Counter + Samtidig: Noe å evaluere opp mot + Lære Google chrome API.