clubmate.fi

A good[ish] website

Web development blog, loads of UI and JavaScript topics

Check if string starts with, or ends with another string, using JavaScript

This post outlines all the ways we can check if a string starts with or ends with another string, also in case insensitive way. In…

Optional parameter handling in JavaScript functions

This post looks into handling of default function parameter values. ES5 JavaScript doesn’t have a built-in way to handle default parameters…

Git: deleted a bunch of files accidentally, how to get them back?

You know the the sinking feeling when you accidentally wiped out half of the repo with a harmless looking rm -rf . No worried though, there…

Enhance WordPress page speed: load static assets from a cookie-less subdomain

Speed up page load time by parallelising image loading and setting up a cookieless subdomain or a whole new domain. WordPress attaches a…

How to use secure copy to copy files from local machine to a remote, and tab complete the remote server directories

The classic method is to use Cyberduck (or other sftp client) for moving a files to a server. But the scp bash command let’s you do all…

Bower and Gulp: match made in heaven (also)

This is kind of a sequel post to "Bower and Grunt: match made in heaven". With Gulp things are even better. If you’re unsure what’s Bower…

RequireJS part 2: optimizing scripts with r.js

This sequel post peeks under the hood of RequireJS optimization with r.js and gulp . ℹ️ You might want to read the first part of the…

JavaScript: check if function parameter is a string or an object

If a function takes a DOM element as a parameter, it can be a string, or a jQuery object , for example. Or why not both? With a small…

Git: dealing with branches, merging and rebasing

Here's how to make, delete, list, and use branches. Plus solutions to some hairy branching scenarios you might find yourself in. Branching…

Print a bash command output into a file

This post shows how to redirect an output of a command, or static text, into a file. The redirection operator > or >> Print string into a…

  • © 2022 Antti Hiljá
  • About
  • All rights reserved yadda yadda.
  • I can put just about anything here, no one reads the footer anyways.
  • I love u!