Skip to content

Instantly share code, notes, and snippets.

View danthegoodman1's full-sized avatar

Dan Goodman danthegoodman1

View GitHub Profile
@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 / 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

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:

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";
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
@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)',
{
"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",
}
#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:
#export CLICOLOR=1
#export LSCOLORS=ExFxCxDxBxegedabagacad
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[32;1m\]\$(parse_git_branch)\[\033[35m\]$\[\033[m\] "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
@danthegoodman1
danthegoodman1 / working-mdb.min.css
Last active January 14, 2018 17:22
From the website, this has a working dropdown menu hovering
:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#868e96;--gray-dark:#343a40;--primary:#007bff;--secondary:#868e96;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgr