Not today...

comments

Tuto

Bash Script

Writting a bash script is kind of a complicated task, there is a strict syntax, multiple external tools, and some tricks which depends on the version and in some cases on the distribution itself (for example, grep is not the same either you are on BSD or Debian). In this article I will talk about four code habits which can improve the maintainability of your shell scripts Double quotes Everyone who already used a bash script will tell you to mark every variable reading with double quotes: Read More...

Tagged bash

comments

OS

Debian Install

That’s a fact: I can not install a new system without getting into troubles! So, here is a small tutorial in which I will aggregate the main issues I encountered and how I solved them. Creating a bootable USB key on a Mac # plug your USB key, then find it with diskutil list # unmount the usb key (it is mandatory), where X in diskX is the number assigned # to your USB you retrieved with the previous command diskutil unmountDisk /dev/diskX # if you are making a bootable usb key for a Mac run this command, # debian. Read More...

Tagged bash , admin

comments

Tuto

Outside Angular

There are some cases when angular is accessible but we just want to access a specific service without bootstraping an entire application. For example, in some tests I can load some fixtures with the $http service, or use $compile for a simple template. It is pretty simple to do that, but it is not clearly explained in the angular documentation. So here is an example: // The module ng must be loaded angular. Read More...

Tagged javascript , angular , web

comments

Snippet

HTML5 Boilerplate

Sometimes we only need to have a boilerplate quickly to test it through a browser. We only want to have the basis, and having it working fine. You can find here a good generator for what you want. But sometimes, having a snippet in the bash prompt can be needed. So here is an example: # stop script if something bad happen set -e # unzip need to have a tempfile to extract properly TMPFILE="/tmp/tempfile. Read More...

Tagged bash , web