Tag: linux

development
ID: 20190220

Convert FLAC to mp3 like a hacker

#system #linux

So you need to convert a bonch of FLAC files to mp3 and your best search engine only recommands you online file converters that nobody trusts ore require a paid subscription to work. Don’t worry, ... Read more

20 Feb 2019 - less than 1 minute read
development
ID: 20170820

Blockchain and IoT

#blockchain #linux

Here’s a small script to open a JavaScript interface to interact with an IoT device. This interface can then be easily incorporated in a larger Blockchain project with real tangible everyday life o... Read more

20 Aug 2017 - 2 minute read
development
ID: 20170720

Image compression from the command line

#linux

Here’s a small script to compress JPEG images in a folder. Useful to save a few kilobytes of bandwith when serving images from your website. I might improve this script in the future to include mo... Read more

20 Jul 2017 - less than 1 minute read

system
ID: 20170620

Compress a Whole Linux or UNIX Directory

#linux

Ok, that’s a simple one, but it’s always nice to have a quick syntax remainder. So, here’s the best way to compress a whole directory under Linux/UNIX using a shell prompt. This technique is often... Read more

20 Jun 2017 - 1 minute read
system
ID: 20160520

Transfer multiple files simultaneously using SCP

#linux

I have been using the Secure Copy (scp) utility for copying files between my local server and development server. Sometimes I have to copy more than one file. Copying each file can be very annoying... Read more

20 May 2016 - 1 minute read
system
ID: 20151020

GNU Screen Handbook

#linux

GNU Screen is a very useful tool to run a long script on a server and make sure the script will run even if your computer gets disconnected, runs out of battery or whatever. In this article, I’ll ... Read more

20 Oct 2015 - less than 1 minute read

system
ID: 20150720

Archive log files based on date

#linux

Here’s some piece of code to use on a cron job when you have a software component (database or application) that spits out logs and you want to archive or delete those files based on creation date.... Read more

20 Jul 2015 - less than 1 minute read
database
ID: 20150520

Moving MySQL datafiles

#mysql #linux

In this article, I’ll demonstrate multiple solutions to move datafiles Method 1: using symbolic links Stop the Mysql instance. /etc/init.d/mysql stop Then move the files and put symbolic links ... Read more

20 May 2015 - less than 1 minute read
database
ID: 20140920

Running Mysql commands from Bash script

#mysql #linux

Eventually, you’ll need to automate queries on your Mysql database, let’s say, for reporting purposes. Hee’s how to put SQL queries into a shell script, and possibly including variables based on th... Read more

20 Sep 2014 - less than 1 minute read

system
ID: 20140420

Using SCP with file compression

#mysql #linux

The command-line tool SCP can be effectively used to move files and perform file compression in the transfer. However, there’s different ways to achieve this, with different results. Here are a fe... Read more

20 Apr 2014 - less than 1 minute read