Currently browsing: Useful

Transformed elements have a non-static position

Recently I discovered a CSS feature that took me by surprise. Apparently if you apply a CSS transformation to an element, it’s position is considered as non-static, even when element.style.position === ‘static’. Here is a codepen that proves this. As far as I can tell, this is happening on all browsers that implement CSS transforms.

Continue reading →

If you enabled Github 2fa…

You might have noticed that your terminal git push commands do not work anymore and you are required to provide your credentials again. The weird thing is, your regular Github credential (username/password) are not valid anymore! What you actually need to do is provide an access token when you are being prompt for a password […]

Continue reading →

Best practice

If you did any development in AngularJS, I’m sure you know about the $watch function. On every digest cycle, Angular will evaluate an expression to see if its value changes. If it did, it will fire all the listeners on that particular watch. Of course, this can be very expensive as your app grows and […]

Continue reading →

Protractor taking screenshots

A very useful trick when using protractor with jasmine is the ability to take screenshots when one of your tests fail. Here is a very simple afterEach block that verifies if your test passed. If not, a screenshot of the browser is taken and saved. Very useful for figuring out what is going on with […]

Continue reading →

Protractor testing

I’ve been working a lot with protractor recently. And even though there are still some issues with phantomjs, it is still pretty awesome. It integrates seamlessly with Jasmine and Cucumber, so that’s a bonus. To start using protractor you can follow the official documentation here. One very cool feature I like is multiCapabilities. As E2E […]

Continue reading →

Use Github to display 3D objects

Embedding Gists into websites is quite easy thanks to github. But did you know Github also allows you to embed a live 3D viewer for any stl file? Seriously Github, you are awesome! Example: This: <script src=”https://embed.github.com/view/3d/skalnik/secret-bear-clip/master/stl/clip.stl”></script> Becomes this:

Continue reading →

Setting environment variables in Angular using Grunt

I’ve come across an interesting problem recently. While developing an angular app, I needed to switch from a live web service to a local web service during the development. And this got me thinking: “This is the perfect situation where different environments would be incredibly useful”. Instead of manually changing the endpoints of the web […]

Continue reading →

Updates to Hyperion

Hyperion is my default empty WordPress template I base my project on. It includes standard functions I personally use and all the template files I need. It also includes things like custom post loops and a settings page template (among others). Update list: Cleaned up code, with more comments and structure to be more readable. […]

Continue reading →

Preview of my upcoming Windows Phone apps

Recently I started working on some new Windows Phone apps. Why? Because there are countless blog’s and articles that I wish to read online and a lot of those websites don’t have a mobile website. Shame really as they have some really good content posted regularly. So I built an awesome RSS reader that can […]

Continue reading →

A smarter way to get the post thumbnail

Post thumnails are a new feature introduced in WordPress 2.9 and it lets you assign a representative image to your posts/pages/custom posts. It is very useful in archive pages where you have limited space for each article. But what if you don’t have a featured image for your post? What if you don’t need or […]

Continue reading →