This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function triangulateCanvas() { | |
| let points = [], triangles = [] | |
| for (let i = 0; i < numberOfPoints; i++) { | |
| const randomX = random(frameWidth, WIDTH-frameWidth) | |
| const randomY = random(frameWidth, HEIGHT-frameWidth) | |
| points.push([ | |
| constrain(randomX, frameWidth, WIDTH-frameWidth), | |
| constrain(randomY, frameWidth, HEIGHT-frameWidth) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Get Relative Time in PHP (e.g. '1 hour ago', 'yesterday', 'tomorrow', 'in 2 weeks'). | |
| * With the argument `$max_diff` you can specify the number of days from when the | |
| * actual date should be returned witht the format of `$date_format`. | |
| * | |
| * Gist: https://gist.github.com/wottpal/61bc13425a8cedcd88666040d1449bfd | |
| * Fork of: https://gist.github.com/mattytemple/3804571 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # IMPORTANT REQUIREMENTS | |
| # * Make sure the git-user is allowed to perform operations on behalf of | |
| # www-data (without password) by adding this line to `/etc/sudoers`: | |
| # `git ALL=(www-data) NOPASSWD: /usr/bin/git, /bin/mkdir` | |
| # * Make sure `var/www` is owned by www-data:www-data by executing | |
| # `sudo chown -R www-data:www-data /var/www` | |
| # * Add www-data to the git-group by executing `sudo usermod -a -G git www-data` | |
| # * Make sure this file is executable by executing |
NewerOlder