Not today...

Filed under bash...

comments

OS

Debian Install 3

Today I want to install debian on my personal server. And I want to crypt the FS using Luks, and add LVM on top.

I want it to look like that (like this scheme, a lot of reference come from the arch wiki

Read More...

Tagged bash , adminsys

comments

OS

Debian install 2

After many days of configuration, I finally complete the installation of my perfect “workstation” ;). source.list I have to directory for this, first the preferences, then the sources.list. Just run an aptitude update, and you will some missing gpg keys, now run apt-key adv --recv-keys --keyserver keyserver.ubuntu.com <key_number> To have your keys installed. sudo A sudo file is important in order to correctly manage a computer, a simple aptitude install sudo will give you the tool. Read More...

Tagged bash , adminsys

comments

Project

Small docker project

I really like docker (even if I will look at [systemd-nspawn](http://www.freedesktop.org/software/systemd/man/ systemd-nspawn.html)), and also gulp. So I decided to create a small tool for serving a directory with a livereload. The repo is available here What I have learned Docker, especially with boot2docker (I am on MacOSX shame on me), is not really flexible: no evaluation for environment variables you can not store a variable through multiple run, you will need to do a oneliner e. Read More...

Tagged admin , bash , dev

comments

Tuto

ssh, rsync and fswatch

Sometimes I just can’t work on a local environment (particular architecture, particular services, local configuration too complex, etc…). So, I have to synchronize my local directory with a remote one and test the web interface on my local machine. ssh First, ssh! For this I need a ssh connection to the remote server, here I use a particular ssh key. ssh -i ~/.ssh/my_ssh.key mylogin@192.168.0.1 # urls also work ssh -i ~/. Read More...

Tagged admin , bash

comments

tuto

Curl for REST

It has been a long time since the last post. But today, I will just show two tools I use for debugging my REST APIs. First one is the well known curl and the second one is jq. One important feature of curl is its hability to load external files for datas with @ before file name: curl -X POST -H "Content-Type: application/json" -d @filepath Then you can remove the progress bar by adding -s in the options Read More...

Tagged admin , cli , bash

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

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