Skip to content

Instantly share code, notes, and snippets.

🦆
☕️

Mohammed Le Doze mledoze

🦆
☕️
  • Paris, France
Block or report user

Report or block mledoze

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# Add `~/bin` to the `$PATH`
export PATH="$PATH:$HOME/bin"
export TERM='xterm-256color'
View .bash_aliases
# ls aliases
colorflag="--color"
alias ls="ls ${colorflag}"
alias l="ls -lhF ${colorflag}"
alias ll="ls -lhF ${colorflag}"
# List all files colorized in long format, including dot files
alias la="ls -laF ${colorflag}"
# List only directories
View .vimrc
set ai " set auto-indenting on for programming
set showmatch " automatically show matching brackets. works like it does in bbedit.
set vb " turn on the "visual bell" - which is much quieter than the "audio blink"
set ruler " show the cursor position all the time
set laststatus=2 " make the last line where the status is two lines deep so you can see status always
set backspace=indent,eol,start " make that backspace key work the way it should
set nocompatible " vi compatible is LAME
set background=dark " Use colours that work well on a dark background (Console is usually black)
set showmode " show the current mode
set clipboard=unnamed " set clipboard to unnamed to access the system clipboard under windows
View .minttyrc
BoldAsFont=-1
Term=xterm-256color
Transparency=off
OpaqueWhenFocused=no
CursorType=block
CursorBlinks=no
FontSmoothing=full
Font=Consolas
RightClickAction=paste
View .gitconfig
[user]
name = Mohammed Le Doze
email = mledoze@users.noreply.github.com
[alias]
lga = log --decorate --stat --graph --pretty=format:\"%d %Cgreen%h%Creset (%ar - %Cred%an%Creset), %s%n\"
lg = log --decorate --graph --format='%Cgreen%h%Creset %ad %C(cyan)%an%Creset - %s%C(red)%d%Creset' --date=short
l = log --graph --pretty=format:'%Cred%h%Creset - %C(bold blue)%an%Creset -%C(red)%d%Creset %s %Cgreen(%cr)' --abbrev-commit --all
stat = shortlog -sne
View keybase.md

Keybase proof

I hereby claim:

  • I am mledoze on github.
  • I am mledoze (https://keybase.io/mledoze) on keybase.
  • I have a public key ASAXSv9KIVEcT_sqn-YwKid8qV26N6racsqFX_KXytmLago

To claim this, I am signing this object:

@mledoze
mledoze / consul
Last active Jan 26, 2016 — forked from stojg/consul
consul service init script for debian (support access from a docker)
View consul
#!/bin/sh
### BEGIN INIT INFO
# Provides: consul
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: Consul service discovery framework
# Description: Healthchecks local services and registers
# them in a central consul database.
View flag_wiki.py
from lxml import html #pip install lxml
import requests, time, os.path, json
save_to = 'flags_new' #folder where you want to save. NO / !
temp_data, data = {}, {}
def stripper(c_name):
print('Doing: ', c_name)
page = requests.get('https://en.wikipedia.org/wiki/File:Flag_of_' + c_name + '.svg') #loads the webpage
tree = html.fromstring(page.text) #html to xpath tree
@mledoze
mledoze / home-on-the-range.php
Created Jun 27, 2012
PHP implementaion for "Home On The Range" Code Golf's challenge
View home-on-the-range.php
<?php
/*
* http://codegolf.com/home-on-the-range
*
* The Problem
* It's difficult to spot what's missing in a long list of numbers if they are just listed one after the other.
* You can make it easier by organising the numbers into ranges, and that's exactly what you're going to do here.
*
* Your program will receive a set of space-separated numbers on stdin, and it will be expected to print a set of
* ranges on stdout formatted according to the following rules :
You can’t perform that action at this time.