Skip to content

Instantly share code, notes, and snippets.

View smalot's full-sized avatar

Sebastien MALOT smalot

View GitHub Profile

Keybase proof

I hereby claim:

  • I am smalot on github.
  • I am smalot (https://keybase.io/smalot) on keybase.
  • I have a public key ASBJgURE4HpJ6ff7QUMvOVFPkHD_UuuXYVwhM8dxhT9HsAo

To claim this, I am signing this object:

[supervisord]
nodaemon=true
[inet_http_server]
port = 127.0.0.1:9001
username = user
password = 123
[program:sshd]
command=/usr/sbin/sshd -D
@smalot
smalot / install_git_aware.sh
Created November 12, 2015 14:28
Install Git aware
# https://github.com/jimeh/git-aware-prompt
mkdir ~/.bash
cd ~/.bash
git clone git://github.com/jimeh/git-aware-prompt.git
# Add at the end of ".bashrc" file
export GITAWAREPROMPT=~/.bash/git-aware-prompt
source $GITAWAREPROMPT/main.sh
export PS1="\u@\h \w \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "
@smalot
smalot / docker_install.sh
Last active December 15, 2016 19:01
Install Docker script for Debian Jessie (run it as root)
#!/bin/sh
apt-get purge lxc-docker*
apt-get purge docker.io*
apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo debian-jessie main" >> /etc/apt/sources.list.d/docker.list
apt-get install apt-transport-https -y
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
@smalot
smalot / tips_for_docker.md
Last active October 10, 2015 17:06
Tips for Docker

Stop all containers

docker stop $(docker ps -a -q)

Remove all containers

@smalot
smalot / doctrine_extensions.yml
Created August 11, 2015 22:41
Doctrine Extensions config file with both ORM and ODM support.
# services to handle doctrine extensions
# import it in config.yml
services:
# KernelRequest listener
# extension.listener:
# class: AppBundle\Listener\DoctrineExtensionListener
# calls:
# - [ setContainer, [ @service_container ] ]
# tags:
# # translatable sets locale after router processing
import os
from StringIO import StringIO
import json
import sys
import subprocess
import shutil
def getParent(rootid, id):
print "--> ", id
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
if [ $# -eq 0 ]; then
exit 0
./configure \
--prefix=/usr/share/php53 \
--datadir=/usr/share/php53 \
--mandir=/usr/share/man \
--bindir=/usr/bin/php53 \
--with-libdir=lib64 \
--includedir=/usr/include \
--sysconfdir=/etc/php53/apache2 \
--with-config-file-path=/etc/php53/cli \
--with-config-file-scan-dir=/etc/php53/conf.d \
#!/bin/sh
apt-get install apache2-prefork-dev
apt-get install libxml2-dev libpcre3-dev libbz2-dev libcurl4-openssl-dev libdb4.8-dev libjpeg62-dev libpng12-dev libxpm-dev libfreetype6-dev libmysqlclient-dev libt1-dev libgd2-xpm-dev libsasl2-dev libmhash-dev unixodbc-dev freetds-dev libpspell-dev libsnmp-dev libtidy-dev libxslt1-dev libmcrypt-dev
wget ""
tar zxvf ""
cd ""