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 / 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 / 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 / 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();
}
let xpos = 0;
let ypos = 0;
let xdir = 10;
let ydir = 10;
function setup() {
createCanvas(windowWidth, windowHeight);
background("black");
@nickgs
nickgs / TOSTREAM.CL
Created July 4, 2020 02:21
Convert an RPGLE source member in OS/400 to a stream file with and .RPGLE extension
PGM PARM(&LIB &MEMBER)
DCL VAR(&LIB) TYPE(*CHAR) LEN(20)
DCL VAR(&MEMBER) TYPE(*CHAR) LEN(20)
DCL VAR(&IPATH) TYPE(*CHAR) LEN(150) +
VALUE("/QSYS.LIB/")
/* You will want to change this to your required path */
DCL VAR(&SPATH) TYPE(*CHAR) LEN(150) +
@nickgs
nickgs / ShipShooter.js
Created May 21, 2020 01:32
ShipShooter.js Spring 2020
let ship;
let enemies = [];
function setup() {
createCanvas(windowWidth, windowHeight);
background("black");
ship = new Ship(windowWidth / 2, windowHeight / 2);
}
let ship;
function setup() {
createCanvas(windowWidth, windowHeight);
background("black");
ship = new Ship(windowWidth / 2, windowHeight / 2);
}
@nickgs
nickgs / Pad.js
Last active May 5, 2020 14:34
Soundboard Pad
// Class that defines an object that can play a simple sound given a frequency.
class Pad {
constructor(x, y, freq) {
this.x = x;
this.y = y;
this.width = 100;
this.height = 100;
this.freq = freq;
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Flexbox layouts</title>
<link href="https://fonts.googleapis.com/css?family=Dancing+Script&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href='css/styles.css'/>
<link rel="stylesheet" type="text/css" href='css/layout.css'/>
</head>
<body>
body {
background-color: AliceBlue;
margin: 0;
padding: 0;
font-family: 'Roboto', sans-serif;
}
a {
color: #FF0000;
font-size: 2rem;