Skip to content

Instantly share code, notes, and snippets.

View bobmaerten's full-sized avatar
🏠
Working from home

Bob Maerten bobmaerten

🏠
Working from home
  • Level UP Solutions
  • Valenciennes, France
View GitHub Profile
@bobmaerten
bobmaerten / postinstall_ubuntu_11.10.sh
Created October 6, 2011 10:26 — forked from alejandro/ubuntu
Getting ready for a developer machine. Ubuntu 11.10
#!/usr/bin/env bash
echo "Using apt-get to install OS packages so let's update it first ..."
sudo apt-get update -y
echo "Installing OS packages. You will be prompted for your password ..."
sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev vim zsh -y
echo "Installing Utility packages."
sudo apt-get install ubuntu-restricted-extra chromium-browser
@bobmaerten
bobmaerten / page.css
Created November 13, 2011 22:15
Un peu d'animation
.affiche {
position: relative;
height: 260px;
overflow:hidden;
padding: 0;
}
.affiche img {
margin: 0;
padding: 0;
@bobmaerten
bobmaerten / ubuntu_ruby_install.sh
Created March 9, 2012 13:56
Ubuntu Ruby install - rbenv and ruby-build
#!/bin/bash
# pre-requisites
sudo apt-get install curl libssl-dev
# Install rbenv
# https://github.com/sstephenson/rbenv
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
@bobmaerten
bobmaerten / .tmux.conf
Created July 20, 2012 13:49
Mon .tmux.conf actuel
# status bar
set-option -g status-utf8 on
# left side of status bar
set -g status-left-length 30
set -g status-left '#S #h'
# right side of status bar
set -g status-right-length 30
set -g status-right '%Y-%m-%d | %H:%M #[default]'
#!/bin/sh
SCP_USER='bob'
SCP_HOST='host'
SCP_PATH='/path/to/web/files/host.net/x/'
HTTP_URL="http://host.net/x/"
FILENAME=`(cat /dev/urandom|head -c 10; date) | md5 | head -c 10`.png
FILEPATH=/tmp/$FILENAME
@bobmaerten
bobmaerten / exemple.md
Created June 17, 2013 14:42
Utilisation de diff pour obtenir la liste des fichiers/répertoire modifiés par un ou plusieurs commits. À la demande de @nicosomb dans le cadre d'une utilisation d'un hook git.

Voici mon dépôt git contenant la dernière version de oh_my_zsh, avec quelques commits locaux.

$ cd $ZSH
$ git branch -a
* local
  master
  remotes/origin/HEAD -> origin/master
$ git log --pretty=format:"%h %d %s" | head -4
0649746  (HEAD, local) rebase instead of git pull while upgrading
@bobmaerten
bobmaerten / files_gemrc
Created December 13, 2013 15:08
ansible-playbook for installing Ruby via rbenv on Debian7 system. This playbook was first published by @mmoya on http://mmoya.org/blog/2013/02/22/installing-rubyrbenv-with-ansible/
---
:sources:
- http://gems.rubyforge.org
- http://gems.github.com
gem: --no-ri --no-rdoc
@bobmaerten
bobmaerten / apache-vhost
Created February 24, 2014 15:31
Redirection :80 -> :443
<VirtualHost *:80>
ServerName plop
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</VirtualHost>
<VirtualHost *:443>
@bobmaerten
bobmaerten / pgsql-docker
Last active July 27, 2018 13:24
Start/Stop/Status Shell script for managing docker-postgresql container from @kamui
#!/usr/bin/env bash
PGSQL_DATA_PATH='/data/pg'
SERVER_CONTAINER="postgresql-server"
DATA_CONTAINER="postgresql-data"
function getStatus(){
CONTAINER_ID=$(docker ps -a | grep -v Exit | grep $SERVER_CONTAINER | awk '{print $1}')
if [[ -z $CONTAINER_ID ]] ; then
echo 'Not running.'
@bobmaerten
bobmaerten / default
Created April 29, 2014 08:00
Reverse proxy configuration with Apache/httpd mod_macro
<Macro RedirSSL ${domain}>
<VirtualHost *:80>
ServerName ${domain}.domain.com
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</VirtualHost>
</Macro>
#-------