Skip to content

Instantly share code, notes, and snippets.

@nicolasramy
nicolasramy / gnome-shell-extensions.md
Last active December 22, 2015 00:28
List of my favourites Gnome Shell extensions

Docker

Installation

If https failed

E: The method driver /usr/lib/apt/methods/https could not be found.

Install this missing package

@nicolasramy
nicolasramy / category_add_class_to_current.md
Last active December 22, 2015 06:18
Simple Wordpress hacks

Simple Wordpress Hacks

Categories

Add class on current Category item

Base

<div id="sidebar">
@nicolasramy
nicolasramy / .bash_aliases
Last active September 7, 2016 14:21
My personnal dotfiles configuration for Gnu Screen, Vim, Bash for system administration
# Aliases
alias refresh-source='source $HOME/.bashrc'
@nicolasramy
nicolasramy / pip.sh
Created January 30, 2014 00:20
Simple bash_completion file: pip, venv-* functions. (venv-functions details: https://gist.github.com/nicolasramy/6438236#file-bash_functions_python)
#!/bin/sh
_pip_completion() {
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
first="${COMP_WORDS[0]}"
commands=$($first --help | awk '/Commands\:/,/General Options\:/' | \
\grep -E -o "^\s{2}\w*" | tr -d ' ')
opts=$($first --help | \grep -E -o "((-\w{1}|--(\w|-)*=?)){1,2}")
@nicolasramy
nicolasramy / Dockerfile
Last active August 29, 2015 13:57
Pourquoi continuer à utiliser une VM quand on peut faire autrement ?
FROM ubuntu
MAINTAINER Nicolas Ramy "nicolas.ramy@darkelda.com"
RUN echo "deb http://archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y upgrade
# Keep upstart for complaining
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -sf /bin/true /sbin/initctl
@nicolasramy
nicolasramy / momoticon.md
Last active February 10, 2017 12:10
Momoticon, another version of emoticons

Happy

^_^
^.^
@nicolasramy
nicolasramy / shell.md
Last active August 10, 2021 15:30
[DRAFT] Useful commands and alias

Shell

Nohup

To run command silently

nohup command-with-options &

Kill

@nicolasramy
nicolasramy / deploy.sh
Last active August 29, 2015 14:03
Simple script to deploy static websites + snapshot generation through SSH
#/bin/bash
PROJECT_NAME=my_website
WORKSPACE=/var/www
USERNAME=www-data
PORT=22
DATEMARK=`date +%Y%m%d%H%M%S`
HOSTNAME=www.example.com