RSSAmplifier

Blog

self.li

Note to self and share with others

blog.self.liRSS feed ↗20 posts

Latest posts

How to install PHP 7 on Ubuntu 14.04

In this short tutorial I’m going to explain step by step how to install PHP 7 (the latest stable version) on Ubuntu 14.04 (the latest LTS, or Long Term Support version). It also explains how to upgrade from PHP 5.x to PHP 7 on LEMP stack. Installing PHP 7 on vanilla Ubuntu 14.04 Unfortunately PHP 7 is not available out of the box on 14.04, so we’ll have to add a PPA to be able to install it: sudo…

Investing for 20-somethings: What's in it for me?

Imagine, just for a moment, that you have a very rich and very generous Auntie. She decided to cover your fixed costs to allow you to focus on your career and passions, instead of worrying about job loss and how to pay bills on time. The two of you agreed that the Auntie would pay for your rent (£500/mo), your groceries (£250/mo) and your oh-so-essential connectivity needs (“kids these…

Creating a post-installation script for Ubuntu

I want to share with you today how to create your own bash script that can be used to bootstrap a fresh installation of Ubuntu (and very likely any other Linux distro after small modifications), bringing it very close to a state where you can just open your favourite apps and start working. Back in the days of Windows XP I’d create a perfect setup of my machine and use software like Norton…

New Year's resolution: Inbox Zen

It’s good to clean up your environment every now and then. Pretty much everyone uses email today and it seems like many of us don’t really take care of this bit of our cyber space. Every morning I’d wake up to 10-30 emails that I’d select and archive in bulk, without even skimming through their contents, all scattered across different labels, occasionally separated by a few…

Raspberry Pi [Part 3]: Amazon Glacier

Ok, it’s time for some real task for our Raspberry Pi. Today we’ll learn how to configure a command line client for Amazon Glacier and push GBs of data to the cloud. We’ll also configure our Gmail account to send us an email when our RPi is done uploading data. Last, but not least, we will learn how to limit upload rate for RPi so that other devices can still use the internet.…

Raspberry Pi [Part 2]: External drives, Samba and SFTP

In the second part of this series I want to show you how to connect external drives and configure SFTP and Samba for Raspberry Pi. Note: You will need a powered USB hub if you plan to connect 2.5" external HDD (it requires more power than RPi can provide). 1. Update Let’s start with updating our RPi sudo apt-get update && sudo apt-get upgrade 2. Setting up HDD Now, the safest way to plug our…

Raspberry Pi 2: Basic setup without any cables (headless)

Today I want to show you how to set up a headless Raspberry Pi 2 without any extra cables (HDMI or ethernet), screens, keyboards etc. You might have it all lying around, but you might as well be on the go with only your laptop and usb cable powering your Raspberry Pi. You can still follow this guide in case you connect your RPi directly to the router, skipping step 3, where I set up wifi card.…

Scaling down

Minimalism has found its way into my pockets. I’m watching it carefully, trying to figure out what will be its next step. A lot has changed recently and I can’t wait to see what’s next! Wallet Somewhere in 2011, I got my wallet scaled down from a sizable 1" brick into a nice, tiny pack that forces me to keep it tidy. There is no space for coins, excess of banknotes (1 max) or…

All I want for Christmas is you, battery

There is an alarming trend in technology world, especially in mobile phones department. In the past your phone would last for a week or more on a single charge. Phones were mobile . You could unplug it on Friday, go hiking for a weekend and plug it back when you came back home after an adventure. That’s something unheard of for modern phones. Most of them will barely last 1 day. Technology…

CodeIgniter timing out after 300s ? Here's a solution

Hey CodeIgniter developers, here’s another thing to look out for when developing with our favourite framework. We ran into this issue here at GatherContent a little while ago, trying to figure out why PHP scripts triggered from CLI would always time out after 300s, even though every possible setting on the server was set to much higher values. Turns out CodeIgniter overwrites time limit that…

Yellowish tint on your Nexus 7 / Samsung S3? Here's how to fix it

I’ve been using my nexus 7 for nearly a year now and never thought that there would be a simple solution to a problem that every Nexus 7 owner faces (literally) - yellow tint on the screen. We all know it, we all saw it and there’s nothing we can do about it, right? Wrong. I’ve found an app that does an amazing job in terms of fixing (more like hacking) colours on my precious.…

Production/development switch for your codebase

tl;dr: Add “.production” file to the root folder of your codebase on production servers, add “.development” file to the root folder of your codebase on development servers (both files empty, only name is important), ignore them globally in your git repo, ignore them locally in your FTP settings or whatever you’re using to push changes up to your servers (I’m…

Super fast FTP upload (if you have thousands of files)

Update: Ok, reviewing this post a year later, I’m pretty sure you can totally ignore the “solution” below. The best way to go about syncing your folder to a remote server (if you have SSH access) is to use rsync like so: rsync -az ~/path/to/source remoteuser@remoteserver:/path/to/destination Original post below: I vaguely remember one of my ex-colleagues moaning about WordPress…

How much code did you really write? (+ source code)

Have you ever thought how much space is taken by characters (spaces and tabs) preceding your code, just to indent it for readability? I bet when you look at the code in most of the editors, you don’t really notice it. It’s there and it lets your creation breathe. But take a look at the following screenshot from Sublime Text 2 (awesome editor by the way): Notice, how many spaces are…

4 weeks into my 'Half hour' productivity hack

Yes, 4 weeks, and guess what, it still works! It’s not one of those productivity hacks where you try to be super efficient and do more in the same time (that doesn’t work for most people). Instead it is a really simple system and focuses on exploiting our habits. Ok, so what is it all about? A lot of us wakes up early 5 days a week, works in the office for a few hours, comes back home…

CodeIgniter and its Download Helper - be careful!

Beware! Just the other day I’ve experienced an unusual bug, that turned out to be a feature of CodeIgniter’s download helper. Downloading files works as expected in 99% of cases, but the remaining 1% are the files without any extension. If you try to download a file without extension, you’ll see a blank screen, no information whatsoever about what went wrong, no error logs to…

Stop Validating Email Addresses With Your Complex Regex - The PHP Way

In his recent article , David Celis argues that we should stop validating addresses with regular expressions, saying, that it’s waste of time and effort. Apparently instead we should just rely on activation email being sent to the address specified by user. Is that really the best way? Looks like it’s a great moment to share my recent discovery: filter_var($email,…

World’s Largest Wi-Fi Network Doesn't Keep Passwords in Plain Text Anymore - or does it?

It’s a continuation of a story from a few months ago ; FON, claiming to be world’s largest Wi-Fi network, also committed the largest crime against password protection: keeping passwords in plain text / reversible form and sending them in plain text via email, if you used ‘forgotten password’ feature. Looks like FON doesn’t keep passwords in plain text anymore, or…

Front-end is a waiter, back-end is a chef

How do you explain a difference between a front-end and a back-end dev to a non-techie? I was speaking with a friend of mine the other day and she asked me what exactly do I do for a living. –Back-end web development –I replied. –What does it mean that it’s back-end? I don’t get it –she said. –In general, you have front-end and back-end web developers. Let me put it this way: Website…

tl;dr for dummies

You wrote a lengthy blog post that you’re proud of, but fear, that fellow web citizens won’t bother to read it til the end. It seems sensible to make use of tl;dr summary, so you carve a sentence containing all wisdom from your post and you slap it at the end of the post itself . Great! But guess what, it doesn’t help! If I, the lazy reader, am too lazy to scroll down your post,…