snippet - Arch Linux:
1 Jun, 2017
Got an error while trying to update the system "mtop: installing libmariadbclient (10.1.24-1) breaks dependency 'libmysqlclient'". The package 'libmariadbclient' dropped its provide for '...
snippet - Webpack: Remove comments from compressed css
1 Jun, 2017
You can minify css with optimize-css-assets-webpack-plugin, but by default some comments are left untouched. If you want to remove all comments you have to use an option for the cssnano, that is used...
written tutorial - Serve static gzip with webpack and nginx
1 Jun, 2017
Tutorial for serving static gzip with webpack module bundler and nginx server. When you would use nginx directly to compress the output, it would do it on the run and with some load increase the cpu...
snippet - Javascript: move item to end of array (of objects), by property value
29 May, 2017
The snippet shows how to move item to the end of array. In a case where we have an array of objects and we want to move the array item by property value. In this example I am using lodash/underscore...
snippet - PHP: Encode Url for Curl
23 May, 2017
PHP
This snippet encodes urls for curl. If you use special letters like äõöü in url, then you get a bit different url parsing from browsers than curl in PHP. You would think that you could use php's own...
snippet - 401 Unauthorized Error with https redirection
22 May, 2017
Got an unauthorized error from htaccess passwords after https redirection implementation. This was an unexpected result, but I guess what happens is that you are redirected to access denied page...
snippet - PHP: Fix url query parameters starting with
19 May, 2017
PHP
Snippet shows you how to fix url query parameters starting with "...
snippet - WordPress: force https using .htaccess
19 May, 2017
Since Google says https gives websites a small ranking benefit and Let's Encrypt gives free certs, more and more sites have been converted. This is a more thurral snippet of https redirection. It has...
snippet - JavaScript ES6: Clone Object
13 May, 2017
The Object.assign() method copies all properties from one or more source objects to a target object. It returns the target object. This can be used for cloning an object in ES6, just create an empty...
snippet - React: Wait for full render in snapshot testing
5 May, 2017
If you use full render not shallow in your tests, your tests might be rendered before the actual component and its subcomponents are fully loaded. In that case you need to delay the output, while...