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.
$ python -m SimpleHTTPServer 8000
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.
$ python -m SimpleHTTPServer 8000
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
curl
and browser to access http://httpbin.org/getrequests
module and try to access http://httpbin.org/get in python interactive module, print r.json()restapi.py
as base to implement access data in script# 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. | |
# |
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): |
#! /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 |
#!/bin/bash | |
# | |
BACKUPDEST="$1" | |
DOMAIN="$2" | |
MAXBACKUPS="$3" | |
if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then | |
echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]" | |
exit 1 |
# 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. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# |
#!/bin/bash | |
/usr/sbin/usermod -aG docker <user> |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of