Skip to content

Instantly share code, notes, and snippets.

View danthegoodman1's full-sized avatar

Dan Goodman danthegoodman1

View GitHub Profile
#include "FastLED.h"
// ColorWavesWithPalettes
// Animated shifting color waves, with several cross-fading color palettes.
// by Mark Kriegsman, August 2015
//
// Color palettes courtesy of cpt-city and its contributors:
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/
//
// Color palettes converted for FastLED using "PaletteKnife" v1:
{
"itemName": "pbon",
"title": "P-Bon",
"categories": ["Cellular", "USB", "BadUSB", "WiFi", "Bluetooth", "Drone"],
"subtitle": "P-Bon is a Bring-Your-Own-Network penetration testing suite which brings the power of a cellular connection, a mobile linux computer, and a plethora of physical and wireless attacks.",
"heroPic": "https://i.imgur.com/U7lXHFq.jpg",
"galleryItems": ["https://i.imgur.com/Gx6XCcD.jpg", "https://i.imgur.com/D6wmI2J.jpg", "https://youtu.be/Q4enwgQTij8"],
"video": "https://youtu.be/Q4enwgQTij8",
}
@danthegoodman1
danthegoodman1 / main.js
Created January 31, 2018 20:55
From the HoH
/*
Multiverse by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
(function($) {
skel.breakpoints({
xlarge: '(max-width: 1680px)',
large: '(max-width: 1280px)',
const functions = require('firebase-functions');
const cors = require("cors");
const express = require("express");
const path = require("path");
const app = express();
app.use(cors({ origin:true }));
app.use('/', express.static(path.join(__dirname,'views')));
// create a directory called 'views' in the functions folder
// wisit the /widgets/ to get the index, and /widgets/otherfile.html to get the otherfile.html
package cisc181.egghunt;
// import cisc181.egghunt.GamePiece;
// import cisc181.egghunt.eggHuntGame;
// import cisc181.egghunt.eggHuntAction;
import java.util.*;
public class eggHuntTest{
private String up = "up";
private String down = "down";
private String left = "left";

Keybase proof

I hereby claim:

  • I am danthegoodman1 on github.
  • I am danthegoodman (https://keybase.io/danthegoodman) on keybase.
  • I have a public key ASDVutdzPNyzDiGJDdSDogov-kYx088M2WUwbEwTGvHbTAo

To claim this, I am signing this object:

@danthegoodman1
danthegoodman1 / gifFrames.py
Last active March 7, 2019 14:53
Exgtract RGB values of each frame from a gif
from PIL import Image
from PIL import GifImagePlugin
im = Image.open('./tenor.gif')
im.seek(0) # changes the frame we are on
# print(im.tell()) # Tells us what frame we are on
p = im.getpalette()
conv = im.convert('RGB')
# print(conv) # converted frame to rgb
@danthegoodman1
danthegoodman1 / entropy.js
Created July 14, 2019 00:09
Calculates shannon entropy in node.js
let raw = fs.readFileSync('./wannacrydump')
// console.log(raw)
let freqList = []
console.log(`Bytes: ${raw.length}`)
const getEntropy = (bytes) => {
for (let i = 0; i < 255; i++) {
let ctr = 0
for (byte of bytes) {
@danthegoodman1
danthegoodman1 / index.js
Last active October 2, 2019 18:25
Project 1 code snippets
const Compute = require('@google-cloud/compute')
const compute = new Compute({
projectId: '[PROJECT NAME]',
keyFilename: './keyFile.json'
})
const zone = compute.zone('us-east1-b')
const config = {
http: true,
https: true,
@danthegoodman1
danthegoodman1 / speed.js
Last active June 1, 2020 18:52
In order and In Sync (high performance) JS
// Immediate execution, for of with indexes, in order
const r = ["a",2,3,4,5]
const t = (i) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(`hi ${i}`)
}, 1000 * i)
})
}