Skip to content

Instantly share code, notes, and snippets.

View geggleto's full-sized avatar

Glenn Eggleton geggleto

View GitHub Profile
@geggleto
geggleto / README.md
Created December 8, 2019 06:44
Crypto Voxel Scripting

CryptoVoxel Scripting Engine Library

Superduper proof of concept messaging mechanism for CryptoVoxels

Goals

  1. Teleporters
  2. Stretch goal .... Battle Bot Pit with Players controlling their bots for all to watch

Facets

[{"constant":true,"inputs":[{"name":"_interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cfoAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_preferredTransport","type":"string"}],"name":"tokenMetadata","outputs":[{"name":"infoUrl","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"promoCreatedCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":
pragma solidity ^0.4.18;
/// @title GeneScience implements the trait calculation for new kitties
/// @author Axiom Zen, Dieter Shirley <dete@axiomzen.co> (https://github.com/dete), Fabiano P. Soriani <fabianosoriani@gmail.com> (https://github.com/flockonus), Jordan Schalm <jordan.schalm@gmail.com> (https://github.com/jordanschalm)
contract GeneScience {
bool public isGeneScience = true;
uint256 internal constant maskLast8Bits = uint256(0xff);
@geggleto
geggleto / verify-address.js
Created September 22, 2018 05:29
Express Service to verify Metamask Message and recover Ethereum Account used to sign
/**
Locally / Non-SSL: node verify-address.js local
**/
const LOCAL = (process.argv[2] === "local");
const fs = require('fs');
const express = require('express');
const app = express();
const bodyParser = require('body-parser');
const http = require('http');
const https = require('https');
Count 17463 / 104000
violet : 1
cerulian : 2
googly : 5
chartreux : 6
spock : 8
whixtensions : 8
skyblue : 13
peach : 13
bloodred : 15
@geggleto
geggleto / gist:7abc7beb8d32d90c78c48dc797069048
Created February 14, 2018 03:52
Family Jewels Distribution Teaser based on the first 88000 kitties
Count 14687
tongue : 4312
laperm : 3325
raisedbrow : 2400
limegreen : 1393
tigerpunk : 1279
//Problem: Given an array of integers, find the pair of adjacent elements that has the largest product and return that product.
//[-23, 4, -3, 8, -12]
// -23 * 4 = -92
// 4 * -3 = -12
// -3 * 8 = -24
// 8 * -12 = -96
// Return -12
//Loop N-1 times starting at pos 0
class UserRequestValidator
{
public function __invoke(Request $request, Response $response $next)
{
$validator = new Validator();
//rules
<?php
namespace App;
use App\Services\ServerProviderFactory;
use Illuminate\Database\Eloquent\Model;
class Provider extends Model
{
public function service()
Project Agreement
- Project will start once a 50% payment of ($_____.00) has been paid
- The project will take no less than __ weeks to complete
- Project Code will be kept in a repository owned by the contractor, and the IP rights of the code will be in the sole ownership of the contractor.
- The IP rights will be transferred after the remainder of the payment of ($_____.00) has been received.
- Upon delivery, a 30 day license for the code will be provided. Upon expiration you will be invoiced ($_____.00) each month for a monthly licence.