Skip to content

Instantly share code, notes, and snippets.

View duaneking's full-sized avatar
🏡
Working From Home. Code. Love. Defend.

Duane King duaneking

🏡
Working From Home. Code. Love. Defend.
View GitHub Profile
public class Perlin {
public int repeat;
public Perlin(int repeat = -1) {
this.repeat = repeat;
}
public double OctavePerlin(double x, double y, double z, int octaves, double persistence) {
double total = 0;
/*!
*
* wavepot windchimes
* nondefault.net
*
*/
var transpose = 0;
var ct = 0;
<?php
require 'path-to-Stripe.php';
if ($_POST) {
Stripe::setApiKey("YOUR-API-KEY");
$error = '';
$success = '';
try {
if (!isset($_POST['stripeToken']))
throw new Exception("The Stripe Token was not generated correctly");
<?php
// minimal routing
function web_app($routes, $verb, $path) {
$verb = strtoupper($verb);
$path = trim(parse_url($path, PHP_URL_PATH), '/');
foreach ($routes as $route => $func) {
@list($req_verb, $req_path) = preg_split('/\s+/', $route, 2);