I hereby claim:
- I am emeth- on github.
- I am emeth (https://keybase.io/emeth) on keybase.
- I have a public key ASBczxQoTeo78bWqwq603xiIwQreyBkyc523-twXwumyhgo
To claim this, I am signing this object:
// See license: https://github.com/erkie/erkie.github.com/blob/master/README | |
(function() { | |
function Asteroids() { | |
if ( ! window.ASTEROIDS ) | |
window.ASTEROIDS = { | |
enemiesKilled: 0, | |
startedPlaying: (new Date()).getTime() | |
}; |
<script type="text/javascript"> | |
var stripCount = 90, stripX = new Array(), stripY = new Array(), dY = new Array(), stripFontSize = new Array(); | |
for (var i = 0; i < stripCount; i++) { | |
stripX[i] = Math.floor(Math.random()*1265); | |
stripY[i] = -100; | |
dY[i] = Math.floor(Math.random()*7)+3; | |
stripFontSize[i] = Math.floor(Math.random()*24)+12; | |
} |
I hereby claim:
To claim this, I am signing this object:
<?php | |
// This file walks you through the most common features of PHP's SQLite3 API. | |
// The code is runnable in its entirety and results in an `analytics.sqlite` file. | |
// Create a new database, if the file doesn't exist and open it for reading/writing. | |
// The extension of the file is arbitrary. | |
$db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE); | |
I’ll go step-by-step on how to create a virtual host in the XAMPP environment.
As we know, the default http://localhost points to /opt/lampp/htdocs
as the root directory. The desired result is to be able to visit http://examplevhost.local, with the root directory being /opt/lampp/htdocs/examplevhost
.
Note: The steps below are done on Ubuntu 16.04, but they should also work on most other Linux distributions (Debian, Mint, Arch).
Note: I’ll assume that XAMPP is installed in
/opt/lampp/
. If it’s different on your setup, please read carefully and adjust accordingly.
Note: This should be done only once per XAMPP installation. If you want to add another virtual host later you can skip to the next step.
var rngstate; | |
function MathRandom() { | |
// Our own implementation of Math.random(). | |
// Source code was copied from https://github.com/v8/v8/blob/4.6.85/src/math.js#L131 | |
// You need to solve for the rngstate first before this can be used. | |
console.assert(rngstate, "You need to set the global variable `rngstate` first. For example: `rngstate = solve(Math.random(), Math.random());`"); | |
if (!rngstate) return; | |
var r0 = (Math.imul(18030, rngstate[0] & 0xFFFF) + (rngstate[0] >>> 16)) | 0; | |
rngstate[0] = r0; | |
var r1 = (Math.imul(36969, rngstate[1] & 0xFFFF) + (rngstate[1] >>> 16)) | 0; |