Change mysql collation from latin to utf8 - all tables and all columns 1

Change mysql collation from latin to utf8 – all tables and all columns

Change mysql collation from latin* to utf8 can be done by simply stop being a lazy bastard and, take the time to change the default mysql collation for the new databases you create… But what can I say, I’m a lazy bastard after all. I keep doing the same mistake over and over again. Just […]

Batch Watermark photos with imageMagick script 2

Batch Watermark photos with imageMagick script

ImageMagick is an awesome image manipulation tool. It provides an command-line API for literally hundreds of functionalities related to image editing. Every now and then I need to apply watermarks to my images before posting them somewhere online, in public. GIMP, has one or two scripts which extend its functionalities but there’s no neat way […]

Observium - Rename existing devices 3

Observium – Rename existing devices

In case you have a lot of devices monitored by observium and for a reason (a hypervisor migration maybe?) you need to change servers’ hostnames, observium, at the time being, doesn’t seem to support renaming via its web interface but you can successfully do it from the command-line. Read the instructions below. Change current directory […]

ssh refused: sshd[2444]: userauth_pubkey: key type ssh-dss not in PubkeyAcceptedKeyTypes [preauth] 4

ssh refused: sshd[2444]: userauth_pubkey: key type ssh-dss not in PubkeyAcceptedKeyTypes [preauth]

If you just upgraded Ubuntu 15.04/10 to Ubuntu 16.04 LTS (or otherwise upgraded OpenSSH from v6.9 to v7.0 you may be getting the ssh refusal because of changes in OpenSSH. I was specifically getting this error in the /var/log/auth.log (via Webmin): sshd[2444]: userauth_pubkey: key type ssh-dss not in PubkeyAcceptedKeyTypes [preauth]. For this specific error, you […]

Fix nethogs 'creating socket failed while establishing local IP' 5

Fix nethogs ‘creating socket failed while establishing local IP’

As it’s not available in repo nor PPA you need to build it (it is really easy and quickly done). Fetch and extract

Install dependencies and build

Check and run

Source

Handlebars ifequal helper 6

Handlebars ifequal helper

Handlebars.js  {{#if}} helper lacks of equality condition. In cases where some logic should be put inside the template, some folks prefer to override it. But instead of overriding {{#if}} helper, and taking my chances to break previous/older handlebars templates in my projects, I’m always about to use my custom helper {{#ifequal}}.

Usage

 

swap file on

Create a permanent swap file equal to RAM bytes

This entry is part 2 of 2 in the series Messing with the Swap

Create a permanent swap file equal to RAM bytes. Yeah I know this is the lazy admin talking, but the inside wants out …

swap file on

Swap file on! Only when you need it…

This entry is part 1 of 2 in the series Messing with the Swap

So here’s a quick snippet to turn on swap on a file, even after OS installation, temporarily. At line one notice the file size is 4G . Modify it to your needs.

Boostnote is the new kickass note taking app for programmers 7

Boostnote is the new kickass note taking app for programmers

Boostnote  is an open-source note taking app especially designed for programmers. Build up with Electron framework, previously known as atom shell – atom’s editor engine, make it the ultimate free and open-source cross-platform kickass note app for developers! Your notes will be written in markdown and instantly saved, while Boostnote will make sure  your source […]

Sublime Text 2/3 run shell commands On Save #sublimetext 8

Sublime Text 2/3 run shell commands On Save #sublimetext

Sublime Text editor is my favorite along with atom. Have you ever really wanted to run a shell command whenever you save a file in Sublime? Like, automatically commit the changes on a github repo or rsync files to a debug server or start a service like php‘s built-in web server? How about all of them together, […]