Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀

Mickaël MickaelBergem

🚀
View GitHub Profile
@MickaelBergem
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
owncloud:
image: owncloud
ports:
- 80:80
volumes_from:
- owncloud-data
links:
- postgres:owncloud-db
@aldeka
aldeka / blogpost.md
Last active Aug 29, 2015
Things I hate: UI patterns the web presentation layer can't pull off
View blogpost.md

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
MickaelBergem / .gitconfig
Last active Oct 30, 2015
GitConfig Dotfiles
View .gitconfig
[user]
name = ..
email = ..
[core]
editor = nano
excludesfile = ~/.gitexcludes
[push]
default = current
[pull]
default = current
@MickaelBergem
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
NotSqrt / settings_test_snippet.py
Last active Apr 21, 2020 — forked from nealtodd/settings_test_snippet.py
Another shot at this problem ..
View settings_test_snippet.py
class DisableMigrations(object):
def __contains__(self, item):
return True
def __getitem__(self, item):
return "notmigrations"
MIGRATION_MODULES = DisableMigrations()
@garethrees
garethrees / gist:5591027
Last active Oct 14, 2020
Ansible set timezone on Ubuntu host
View gist:5591027
- name: Group by Distribution
hosts: all
tasks:
- group_by: key=${ansible_distribution}
- name: Set Time Zone
hosts: Ubuntu
gather_facts: False
tasks:
- name: Set timezone variables
@kesor
kesor / profile_middleware.py
Last active Nov 28, 2019
Django cProfile middleware
View profile_middleware.py
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.