Skip to content

Instantly share code, notes, and snippets.

danthegoodman1

Block or report user

Report or block danthegoodman1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@danthegoodman1
danthegoodman1 / index.js
Last active Oct 2, 2019
Project 1 code snippets
View index.js
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 / entropy.js
Created Jul 14, 2019
Calculates shannon entropy in node.js
View entropy.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 Mar 7, 2019
Exgtract RGB values of each frame from a gif
View gifFrames.py
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
View keybase.md

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:

View eggHuntTest.java
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";
View Firebase Functions REST API boilerplate.js
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
View main.js
/*
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)',
View pbon.json
{
"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",
}
View wave-testing.ino
#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:
View Pre-ZSH .bash_profile
#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'
You can’t perform that action at this time.