Skip to content

Instantly share code, notes, and snippets.

@manoj23
manoj23 / mw_backup.sh
Last active June 5, 2016 20:11
mediawiki: backup script of LocalSettings.php and DB into a git repository
#!/bin/sh
mw_var()
{
local mw_local_settings=$1
local mw_var=$2
sed -n "s/^\$$mw_var = \"\(.*\)\";/\1/p" $mw_local_settings
}
@manoj23
manoj23 / docker-compose.yml
Last active April 19, 2016 23:21
Run wikimedia with mysql on Docker
version: '2'
services:
mediawiki:
image: wikimedia/mediawiki
links:
- mysql
environment:
- MEDIAWIKI_DB_TYPE=mysql
- MEDIAWIKI_DB_USER=root
- MEDIAWIKI_DB_PASSWORD=mysecretpassword
@manoj23
manoj23 / archlinux-ckermit.md
Last active April 20, 2016 00:28
Archlinux packaging of ckermit and the lock directory issue

Archlinux packaging of ckermit and the lock directory issue

The current situation

ckermit uses the default /var/lock folder which is "rwxr-xr-x 5 root root". ckermit is patched to handle the environment variable LOCK_DIR to specifiy another lock directory. Archlinux no longer provides the lock directory /var/lock/lockdev to allow users in the lock group to read/write into it.

What I suggest

Archlinux should put back the folder /var/lock/lockdev which would be: "drwxrwxr-x 2 root lock": it is unclear why they have removed it.

@manoj23
manoj23 / ubuntu-on-archlinux-using-lxc.md
Last active January 26, 2024 01:22
Install Ubuntu containers on Archlinux using LXC

Install Ubuntu containers on Archlinux using LXC

Install the lxc and the debootstrap packages:

# pacman -Sy lxc debootstrap 

Install an Ubuntu container

I will install Ubuntu 16. Therfore, I will use the xenial release.