Skip to content

Instantly share code, notes, and snippets.

View dtomasi's full-sized avatar

Dominik Tomasi dtomasi

  • Waldshut-Tiengen, Germany
  • 15:10 (UTC +02:00)
View GitHub Profile
@dtomasi
dtomasi / clone-hdd.sh
Last active May 13, 2020 18:31
Backup and Restore HDD Linux
## Create disk image
##
## 1. Boot from a liveCD or liveUSB.
## 2. Make sure no partitions are mounted from the source hard drive.
## 3. Mount the external HD
## 4. Backup the drive.
dd if=/dev/hda conv=sync,noerror bs=64K | gzip -c > /mnt/sda1/hda.img.gz
## Restore the Disk
@dtomasi
dtomasi / default
Last active December 8, 2023 04:20
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}