This script will let you make backups of live VMs running on KVM, using libvirt.
The backup job will suspend the VM for the time it takes to copy the RAM to disk.
Credits: Luca Lazzeroni
I've made some minor adjustments.
$apt-get install nginx python-dev libpcre3 libpcre3-dev | |
$pip install uwsgi | |
$cat uwsgi.ini | |
[uwsgi] | |
socket = /tmp/flask.sock | |
chmod-sock = 666 | |
module = server | |
callable = app | |
enable-threads = true |
<?php | |
if (rand()%5==0) { | |
echo "1111"; | |
} else { | |
echo "0000"; | |
} | |
?> |
#!/usr/bin/env python | |
"""Replacement for htpasswd""" | |
# Original author: Eli Carter | |
import os | |
import sys | |
import random | |
from optparse import OptionParser | |
# We need a crypt module, but Windows doesn't have one by default. Try to find |
#!/bin/bash | |
#Usage: GB2312-UTF8.sh [directory name] | |
DIR=$1 | |
cd $DIR | |
mkdir utf8 | |
for file in *.txt ; do |
<?php | |
// Pear Mail Library | |
require_once "Mail.php"; | |
$event = $_POST['event']; | |
$name = $_POST['name']; | |
$time = date('Y-m-d H:i:s'); | |
$from = '<[email protected]>'; | |
$to = $_POST['email']; |
package org.xdty.buttontest; | |
import android.test.ActivityInstrumentationTestCase2; | |
/** | |
* Created by ty on 15-6-26. | |
*/ | |
public class ActivityTest extends ActivityInstrumentationTestCase2<MainActivity> { | |
public ActivityTest() { | |
super(MainActivity.class); |
server { | |
listen 80 default; | |
listen 443 default; | |
server_name _; | |
ssl_certificate certs/default.crt; | |
ssl_certificate_key certs/default.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:!aNULL:!MD5; |
#!/usr/bin/env python | |
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
# Written by Nathan Hamiel (2010) | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_GET(self): |
This script will let you make backups of live VMs running on KVM, using libvirt.
The backup job will suspend the VM for the time it takes to copy the RAM to disk.
Credits: Luca Lazzeroni
I've made some minor adjustments.
AUTHOR=MAKE_FOR_FUN | |
.DEFAULT: | |
@echo Make $@ great again! | |
install: | |
@echo Make Makefile great again! | |
clean: | |
@echo "America is great." |