Skip to content

Instantly share code, notes, and snippets.

@petervanderdoes
petervanderdoes / zfs_health.sh
Last active March 6, 2024 14:04
ZFS Health Check Script
#! /usr/local/bin/bash
#
# Calomel.org
# https://calomel.org/zfs_health_check_script.html
# FreeBSD 9.1 ZFS Health Check script
# zfs_health.sh @ Version 0.15
# Check health of ZFS volumes and drives. On any faults send email. In FreeBSD
# 10 there is supposed to be a ZFSd daemon to monitor the health of the ZFS
# pools. For now, in FreeBSD 9, we will make our own checks and run this script
@cemeyer
cemeyer / Migrate VMware workstation to qemu+kvm
Last active June 27, 2019 23:18
Steps to migrate a VMware VM to KVM
1) Deleted all vmware snapshots for the VM. sync. sync.
2) Followed rwmj's guide to setting up a br0 device for libvirt in Fedora.[0]
3) Grabbed vmware2libvirt[1] from Ubuntu (it's just a standalone python script) and
used it with --bridge br0 -f foo.vmx > foo.xml.
4) Converted my vmdk to raw with qemu-img[2], moved it to /var/lib/libvirtd per
instructions[3]
5) Edited my xml to point to the right disk, use the qemu/raw driver, use the right
path for kvm (/usr/bin/qemu-kvm on Fedora).
5.a) Configure a unix socket serial device (like VMware's "pipe" mode):
# This gist is compatible with Ansible 1.x .
# For Ansible 2.x , please check out:
# - https://gist.github.com/dmsimard/cd706de198c85a8255f6
# - https://github.com/n0ts/ansible-human_log
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@larrycai
larrycai / README.md
Last active March 21, 2021 01:52
Learn REST API with Python script, slides : http://www.slideshare.net/larrycai/learn-rest-apiwithpython

Introduction

Learn REST API with Python script, slides : http://www.slideshare.net/larrycai/learn-rest-apiwithpython

REST/JSON is perfect match to fetch web data, and python requests module

@willurd
willurd / web-servers.md
Last active May 24, 2024 13:07
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000