Skip to content

Instantly share code, notes, and snippets.

View nickgs's full-sized avatar
👋

Nick Selvaggio nickgs

👋
  • Sego Solutions, LI Blockchain
  • Long Island
  • X @direct
View GitHub Profile
@nickgs
nickgs / particles.js
Last active October 25, 2020 19:43
Super Basic Particle System
function setup() {
createCanvas(windowWidth, windowHeight);
background("red");
let pe = new ParticleEmitter();
pe.draw();
}
@nickgs
nickgs / clouds.js
Last active November 5, 2020 03:33
Introducing Classes and Objects.
/*
Illustrates the basics of object oriented programming.
A class defines a blueprint to create something. The `new` operator builds an objects from that class.
*/
function setup() {
createCanvas(windowWidth, windowHeight);
background("blue");
@nickgs
nickgs / ShipShooter.js
Last active December 8, 2020 15:25
Ship Shooter
// Our Ship Shooter Game.
let ship;
function setup() {
createCanvas(windowWidth, windowHeight);
background("black");
// Build the ship and store it in our ship variable.
ship = new Ship();
}
@nickgs
nickgs / xbox_watcher.sh
Created December 15, 2020 20:41
Keep track of Best Buy console releases.
#!/bin/bash
# use this with the `watch` command to keep an eye on the xbox page and when it becomes available.
#ex. watch -n 5 ./xbox_watcher.sh
#Xbox
#https://www.bestbuy.com/site/microsoft-xbox-series-x-1tb-console-black/6428324.p?skuId=6428324
#Switch
pragma solidity ^0.4.19;
contract ERC20Basic {
string public constant name = "ERC20BasicName";
string public constant symbol = "BSC";
uint8 public constant decimals = 18;
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
@nickgs
nickgs / erc20.json
Created February 19, 2021 21:49
ERC20 ABI
[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
// Base Functions
function int Mandel(float x0, y0, z0; int imax) {
float x, y, z, xnew, ynew, znew;
int i;
x = x0;
y = y0;
z = z0;
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "contract IERC20Upgradeable",
"name": "token",
"type": "address"
},
[
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
<!DOCTYPE html>
<html>
<head>
<title>Playing with Images</title>
</head>
<body>
<header>
<img width="100px" src="images/googlelogo.png"></img>
</header>
<nav>