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.
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.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist | |
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist | |
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz | |
sudo pkgutil --forget org.macosforge.xquartz.pkg | |
# Log out and log in |
package main | |
import ( | |
"unicode" | |
) | |
// ToSnake convert the given string to snake case following the Golang format: | |
// acronyms are converted to lower-case and preceded by an underscore. | |
func ToSnake(in string) string { | |
runes := []rune(in) |
package com.ilirium.client; | |
import java.io.ByteArrayOutputStream; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.PrintStream; | |
import java.math.BigInteger; | |
import java.security.InvalidKeyException; | |
import java.security.KeyPair; |
global | |
maxconn 32768 | |
quiet | |
# Performance turning | |
tune.maxaccept -1 | |
stats socket /tmp/haproxy.sock mode 0666 level admin | |
log 127.0.0.1 local0 notice | |
log 127.0.0.1 local0 debug |
// Playbook - http://play.golang.org/p/3wFl4lacjX | |
package main | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"encoding/base64" |
#!/usr/bin/bash | |
# | |
# Script should be run in GZ. | |
# | |
# example: | |
# ./add-flow-to-vm.sh c480b89f-f8a1-41b1-abd0-45bac4685cb2 15M | |
# | |
# It will add TCP/UDP flows for this particular VM, and limits bandwidth to 15Mbps | |
# |
/* | |
* Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com> | |
*/ | |
import akka.actor.ActorSystem | |
import akka.http.Http | |
import akka.http.Http.IncomingConnection | |
import akka.http.model.HttpEntity | |
import akka.http.model.Multipart.FormData | |
import akka.http.server.{ Directives, Route, RoutingSetup } |