Run mdadm - this command is used to manage and monitor software RAID devices in linux.
mdadm --detail /dev/md0
or md<N>
mount -t ext4 /dev/md0 /share/MD0_DATA
Check disks
mdadm --examine /dev/sdd3
Run mdadm - this command is used to manage and monitor software RAID devices in linux.
mdadm --detail /dev/md0
or md<N>
mount -t ext4 /dev/md0 /share/MD0_DATA
Check disks
mdadm --examine /dev/sdd3
A friend of mine recently asked me for help on a specific zip file that was supposed to contain a bunch of files with japanese names.
No matter what was used to extract or what the system locale was set to, the file names would end up garbled. We tried unzip and 7z to no avail.
After some googling I found guides that explained that you have to prevent 7z
from automatically converting to utf8 by unzipping with LC_ALL=C
and
[root@plex ~]# cat /etc/systemd/system/minecraft@.service | |
[Unit] | |
Description=Minecraft Server %i | |
[Service] | |
WorkingDirectory=/opt/minecraft-%i | |
User=mcserver | |
Type=forking | |
ExecStart=/usr/bin/tmux new-session -s mc-%i -d '/bin/java -Xmx2048M -jar minecraft_server.jar nogui' |
#!/bin/bash | |
#set -x | |
# ------------------------------------------- | |
# Vars | |
# ------------------------------------------- | |
SEAFILE_ADMIN=admin@seafile.lan | |
SEAFILE_USER=seafile | |
SEAFILE_SERVER_NAME=$(hostname -s | cut -c -16) | |
SEAFILE_DNS=$(hostname -i) | |
HOSTNAME=$(hostname -i) |
import org.apache.commons.io.FileUtils; | |
import org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; | |
import org.bouncycastle.openpgp.*; | |
import org.bouncycastle.openpgp.examples.ByteArrayHandler; | |
import org.bouncycastle.openssl.PEMReader; | |
import org.bouncycastle.util.io.Streams; | |
import java.io.*; | |
import java.security.NoSuchProviderException; | |
import java.security.Security; |
If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:
In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
# Make sure you have IMAP enabled in your gmail settings. | |
# Right now it won't download same file name twice even if their contents are different. | |
import email | |
import getpass, imaplib | |
import os | |
import sys | |
detach_dir = '.' |