To clone a repo with all its submodules:
git clone --recursive [git://url]
Add a submodule
git submodule add [git://url] [path/to/submodule]
Load submodules if they weren’t when cloning
git submodule update --init
php -S localhost:8000 kirby/router.php
### charset | |
AddDefaultCharset UTF-8 | |
### directory index | |
DirectoryIndex index.html | |
### avoid directory listing | |
Options -Indexes | |
### default language |
/** | |
* requires p5.js | |
* try out at https://editor.p5js.org | |
*/ | |
let ball = { | |
x: 300, | |
y: 150, | |
radius: 10, | |
speed: { |
^(([A-Fa-f\d]){3}){1,2}$
class Cell { | |
constructor( x, y, on = true ){ | |
this.x = x; | |
this.y = y; | |
this.on = on; | |
if( this.on === false ){ | |
this.radius = 0; | |
} else { | |
this.radius = maxRadius; |
let board = { | |
x: 10, | |
y: 10, | |
w: 10, | |
h: 10, | |
min: {x: 60, y: 40}, | |
max: 30, | |
area: function( x , y ){ | |
this.x = max( this.max, min( (width/2) -(this.min.x/2), min( x, width-x ) ) ); |
function random255(){ | |
return round(random(0,16)) * 16; | |
} | |
function randomColor() { | |
return { | |
r: random255(), | |
g: random255(), | |
b: random255() | |
}; |
function randomPoint() { | |
return { | |
x: round(random(0, width / 20)) * 20, | |
y: round(random(0, height / 20)) * 20 | |
}; | |
} | |
let rule = { | |
lines: [], | |
reinvent: function() { |
## Year validation YYYY 1800 until now | |
^(18|19|20)\d{2}$ | |
## Pseudo URL validation | |
^https?:\/\/ |