This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const b64ToGuid = (b64) => { | |
const bytes = Buffer.from(b64, "base64"); | |
bits = []; | |
bytes.forEach(byte => { | |
bits.push(byte.toString(16).padStart(2, '0')); | |
}); | |
const data = bits.join(""); | |
const parts = []; | |
parts.push(data.substring(0, 8).split("").reverse().join("")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const hookFetch = global.fetch; | |
type collection = { | |
[key: string]: { | |
response: { | |
success?: unknown | |
error?: unknown | |
} | |
headers?: { | |
[key: string]: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inspired By | |
// https://stackoverflow.com/questions/6213227/fastest-way-to-convert-a-number-to-radix-64-in-javascript | |
// Haven't Fully Tested or implemented in a prod environment | |
// Generate Random Value matching a guid | |
const Guid = (): string => { | |
return 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'.replace(/[x]/gi, () => { | |
const crypto = require('crypto'); | |
const id = crypto.randomBytes(16).toString("hex")[5]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from: https://stackoverflow.com/questions/9781218/how-to-change-node-jss-console-font-color | |
const color = { | |
Reset : "\x1b[0m", | |
Bright : "\x1b[1m", | |
Dim : "\x1b[2m", | |
Underscore : "\x1b[4m", | |
Blink : "\x1b[5m", | |
Reverse : "\x1b[7m", | |
Hidden : "\x1b[8m", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const files = [ | |
"path/1/pages/home.html", | |
"path/1/pages/about.html", | |
"path/1/pages/settings.html", | |
"path/1/pages/contact.html", | |
"path/1/assets/images/background.jpeg", | |
"path/1/assets/images/logo.png", | |
"path/1/assets/images/arrow-left.png", | |
"path/1/assets/images/arrow-right.png", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Tic Tac Toe</title> | |
<style> | |
button { | |
font-size: 40px; | |
height: 100px; | |
width: 100px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>FileInput -> Image -> Canvas -> Bytes</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Newtonsoft.Json; | |
using System.Collections.Generic; | |
using System.Net.Http; | |
using System.Text; | |
namespace discordWebHook | |
{ | |
class Program | |
{ | |
private static HttpClient client; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{[ | |
"Acme Corp.", | |
"Aperture Science", | |
"Armacham", | |
"Bartok Science", | |
"Benthic Petroleum", | |
"Biffco Enterprises", | |
"Big Kahuna Burger", | |
"Black Mesa", | |
"Blue Sunv", |
NewerOlder