rebuild a fusion drive

Hi everyone.
In this tutorial, I’m going to show you how to rebuild a fusion drive.
I recently, upon fiddling a bit too far, screwed my iMac’s fusion drive. As often when I break my toys, I go through all seven steps of mourning:

  • shock: oh f$%k, it won’t boot anymore!
  • denial: I’m certainly missing something, let’s try again (and again, and again…).
  • anger then sadness: screw it! stupid computer! Aaaaaw come one, Apple will charge me bazillions to fix this!
  • resignation: ok, I tried everything, I’m really screwed!
  • acceptance and reconstruction: ok, let’s draw my best friend the Terminal and see what we can do…

Hopefully, every version on macOS comes with a handy set of commands that you can use to rebuild a fusion drive.
Continue reading

brew

Reinstall Script for macOS

macOS is shipped with a very powerful shell, allowing you to use command line whenever needed.

When you have to install an app from Internet, what do you do: search for it, download it, open DMG file, copy to Applications folder, unmount DMG and trash it. How boring!

I have thus created a tiny script that automates all of these actions. You will find it on my personal repository.

This tiny script is an example of how command line can make your life easier. It relies on Brew to install everything you need the easy way.

Continue reading

SSH

SSH Permissions

When using SSH key pairs to authenticate to a distant server, these keys are stored onto your client, typically under ~/.ssh folder. Unless you’re using Windows. In this case there is nothing I can do for you.

Using Lynis to audit a server, I asked myself what could be the best practices in terms of permission for ~/.ssh folder and its content.

Here are values I recommend.

For ~/.ssh folder:

For public key:

For private key:

Further readings:

Hi fellas.

I’ve been playing Supercell’s Boom beach for a while now, and I’ve seen dozens and dozens of supposedly wrking “hacks” that promise you diamonds, resources and so on…All of them are reported as dirty hacks, some even try to steal your informations by installing crapware on your phone.

Here’s a “hack” involving a simple tool that works on jailbroken iOS Phones. The idea is to simulate touchscreen actions. This way, the game will never reload, thinking that you are always there playing. So nobody will ever attack you!

Continue reading

OpenVZ containers really changed my way of using virtual machines. It has a lot of pros and only a few cons.

One of these pros is the ability to execute a command on a container directly from the host. For example, to reboot container 102:

This  command is very, very powerful. For example, I use this one to apt-get update all my running containers:

Where “vzlist -H -o ctid” displays a list of all running containers (see here for more).

Handy, isn’t it? but wait, there is more! I host a CT for a friend and I let him plan his updates whenever he want, all by himself. So I created this lil’ script to help it out:

Here all containers whom numbers are in “avoid” list will not be affected.

Source: Stackoverflow: iterate over an array and avoid a value

Today I’m going to show you how to make your server tweet alerts. This might be the first of a long series of admin tools!

The aim of this very first example is to create a script that, periodically, is being run on your server to check if there are updates available. If it is the case, then the script must send an alert.

Challenge accepted, b*tch!

Challenge accepted, b*tch!

Continue reading