Docker : activer les restrictions RAM & swap

# vim /etc/default/grub 
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
# update-grub
# vim /etc/default/docker
DOCKER_OPTS="--exec-opt native.cgroupdriver=cgroupfs"
# shutdown -r now

Debian : fix startup Docker 1.7 & kernel 4.1

sept. 20 19:34:19 muse systemd[1]: Started Docker Application Container Engine.
sept. 20 19:34:19 muse docker[18643]: time="2015-09-20T19:34:19.773439875+02:00" level=error msg="[graphdriver] prior storage driver \"aufs\" failed: driver not supported"
sept. 20 19:34:19 muse docker[18643]: time="2015-09-20T19:34:19.773487551+02:00" level=fatal msg="Error starting daemon: error initializing graphdriver: driver not supported"
# rm -rf /var/lib/docker/aufs
# systemctl start docker

Debian : fix crash Netbeans 8

# vim /etc/java-8-openjdk/accessibility.properties
#assistive_technologies=org.GNOME.Accessibility.AtkWrapper

Git : appliquer une stratégie de merge différente

# git checkout master
# git merge --no-ff release -X theirs

MongoDB : déployer rapidement un replicat set local

https://github.com/allanbank/mongodb-tricks

https://github.com/allanbank/mongodb-tricks/blob/master/src/main/scripts/replica-set-start.sh

Linux : afficher la consommation swap par processus

# for file in /proc/*/status ; do awk '/^(VmSwap|Pid|Name)/{printf $2 " " $3}END{ print ""}' $file; done | sort

Git : prompt bash

Un prompt bash spécialisé pour l’utilisation de Git :

https://github.com/magicmonty/bash-git-prompt

Linux : tester les performances I/O

# hdparm -t -T /dev/sda
# dd bs=1M count=512 if=/dev/zero of=test conv=fdatasync
# bonnie++ -d /mnt -r 8000 -u toto

PostgreSQL : afficher les droits spécifiques associés à un table

dbname=# SELECT grantee,privilege_type FROM information_schema.role_table_grants WHERE table_name='mytable';

 grantee  | privilege_type 
----------+----------------
 user1    | INSERT
 user1    | SELECT
 user1    | UPDATE
 user1    | DELETE
 user1    | TRUNCATE
 user1    | REFERENCES
 user1    | TRIGGER
 user2    | INSERT
 user2    | SELECT
 user2    | UPDATE
 user2    | DELETE
(11 rows)

Talend : erreur avec le service org.talend.core.model.components.IComponentsService

java.lang.RuntimeException: Le service org.talend.core.model.components.IComponentsService n'a pas été enregistré.
    at org.talend.core.GlobalServiceRegister.getService(Unknown Source)
    at org.talend.repository.model.ComponentsFactoryProvider.getInstance(Unknown Source)
    at org.talend.core.CoreService.componentsReset(Unknown Source)
    at org.talend.core.repository.model.ProxyRepositoryFactory.logOnProject(Unknown Source)
    at org.talend.repository.ui.login.LoginDialog$1.run(Unknown Source)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Pour fixer cette erreur, le répertoire suivant est à supprimer :

# rmdir C:\Talend\workspace\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes
Haut de page