This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.
Step 1 - Enable NBD on the Host
modprobe nbd max_part=8
/** | |
* Converts an RGB color value to HSL. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and l in the set [0, 1]. | |
* | |
* @param Number r The red color value | |
* @param Number g The green color value | |
* @param Number b The blue color value | |
* @return Array The HSL representation |
exports.reversePath = function(path) | |
{ | |
var reversedPath = []; | |
for(var i = 0; i < path.length; i++) | |
{ | |
var currentStep = path[i]; | |
var dx = currentStep.dx * -1; | |
var dy = currentStep.dy * -1; |
NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception
# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
The install fails with BSOD and "Your PC ran into a problem and needs to restart. We're just collecting some error info, and then we'll restart for you."
After reboot it returns with the following message: "The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed. To install Windows, click OK to restart the computer, and then restart the installation.":
var Text = pc.createScript('text'); | |
Text.attributes.add('text', { type: 'string', default:'Hello World!' }); | |
Text.attributes.add('fontsize', { type: 'number', default:70, title:"Font Size" }); | |
// initialize code called once per entity | |
Text.prototype.initialize = function() { | |
// Create a canvas to do the text rendering | |
this.canvas = document.createElement('canvas'); | |
this.canvas.height = 128; |
var canvas = document.createElement('canvas'); | |
var gl; | |
var debugInfo; | |
var vendor; | |
var renderer; | |
try { | |
gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); | |
} catch (e) { | |
} |
Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.
However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.
// https://forum.unity.com/threads/oblique-near-plane-clipping.194722/ | |
public class Clipper : MonoBehaviour | |
{ | |
Matrix4x4 projection; | |
Camera offscreenCam; | |
void Start () | |
{ | |
projection = camera.projectionMatrix; | |
} |