Skip to content

Instantly share code, notes, and snippets.


Mickaël MickaelBergem

View GitHub Profile
MickaelBergem / owncloud-docker-compose.yml
Created Aug 26, 2015
`docker-compose.yml` file for setting up an ownCloud server using a PostgreSQL database
View owncloud-docker-compose.yml
# Composition of the containers
image: owncloud
- 80:80
- owncloud-data
- postgres:owncloud-db
aldeka /
Last active Aug 29, 2015
Things I hate: UI patterns the web presentation layer can't pull off

It's a fairly common UI pattern in chat programs. You have a set of people talking in a chatroom, and one person sends multiple messages in a row. Instead of styling each of these messages like one-off messages, you style the additional messages so they appear as a unit with the first message by that author, until interrupted by someone else. You remove horizontal border lines, or you make the message author's name only appear once, or you do some nice thing with padding. Whatever.

Screenshot of Slack exhibiting this message-merging behavior

This is a pretty common pattern. It's also something that obviously ought to be handled by the presentation layer--your application code shouldn't care what order the chat messages happen to come in, and you shouldn't have to add wrapper divs and other jiggery-pokery when subsequent messages come in or get deleted and worry about determining whether this "chunk" of messages is interrupted by other chats or not.

Unless the number

MickaelBergem / .gitconfig
Last active Oct 30, 2015
GitConfig Dotfiles
View .gitconfig
name = ..
email = ..
editor = nano
excludesfile = ~/.gitexcludes
default = current
default = current
MickaelBergem / git-clean-merged-branches
Last active Aug 29, 2015
Remove all local branches that have been merged
View git-clean-merged-branches
# Will remove all merged branches, except the current one.
git remote prune origin && git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
NotSqrt /
Last active Apr 21, 2020 — forked from nealtodd/
Another shot at this problem ..
class DisableMigrations(object):
def __contains__(self, item):
return True
def __getitem__(self, item):
return "notmigrations"
MIGRATION_MODULES = DisableMigrations()
garethrees / gist:5591027
Last active Oct 14, 2020
Ansible set timezone on Ubuntu host
View gist:5591027
- name: Group by Distribution
hosts: all
- group_by: key=${ansible_distribution}
- name: Set Time Zone
hosts: Ubuntu
gather_facts: False
- name: Set timezone variables
kesor /
Last active Nov 28, 2019
Django cProfile middleware
from django.core.exceptions import MiddlewareNotUsed
from django.conf import settings
import cProfile
import pstats
import marshal
from cStringIO import StringIO
class ProfileMiddleware(object):
def __init__(self):
if not settings.DEBUG:
You can’t perform that action at this time.