Skip to content

Instantly share code, notes, and snippets.

@samdenty
samdenty / endpoint.ts
Last active July 4, 2020 21:21
comlink chrome extensions
import * as Comlink from 'comlink';
export const PORT_ID = '@@@PORT_ID';
const ports = new Map<string, chrome.runtime.Port>();
chrome.runtime.onConnect.addListener((port) => {
if (port.name.startsWith(PORT_ID)) {
ports.set(port.name, port);
}
class Generator {
constructor(
readonly zero: string,
readonly one: string,
readonly separator: string
) {}
encode(data: string) {
return data
.split('')

Keybase proof

I hereby claim:

  • I am samdenty on github.
  • I am samdd (https://keybase.io/samdd) on keybase.
  • I have a public key whose fingerprint is CD98 4190 4626 A47F 69EC CC6D A1E1 8D50 4766 B896

To claim this, I am signing this object:

(function getCompletions(type) {
let object;
if (type === "string") object = new String("");
else if (type === "number") object = new Number(0);
else if (type === "bigint") object = Object(BigInt(0));
else if (type === "boolean") object = new Boolean(false);
else object = this;
const result = [];
try {
for (let o = object; o; o = Object.getPrototypeOf(o)) {
var t = {
people: [{
names: ["grinning"],
surrogates: "😀"
}, {
names: ["grimacing"],
surrogates: "😬"
}, {
names: ["grin"],
surrogates: "😁"
# Your WidgetBot license token
license: ''
# NEDB configuration - see https://github.com/louischatriot/nedb/wiki/Creating-loading-the-database
database:
# The path to where the NeDB database should be stored
dir: ./data/database/
# The secret to use when verifying JWT tokens
# WARNING: Keep this private. If an attacker gains ahold
<!DOCTYPE HTML>
<html>
<head>
<title>Baddeveloper</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="./assets/css/main.css" />
<noscript><link rel="stylesheet" href="./assets/css/noscript.css" /></noscript>
<script src="./assets/js/particles.js"></script>
<link rel="icon" type="image/jpeg" href="./images/favicon.jpg" />
@samdenty
samdenty / Websocket emulator.js
Last active April 10, 2018 00:48
Websocket emulator for Chrome devtools
/**
* Transport layer emulator
*/
class Transport {
constructor(/** @type {WebSocket} */ websocket) {
this.send = (...args) => websocket._send(...args)
this.close = () => websocket.close()
this.onOpen()
}
@samdenty
samdenty / DiscordCrypt.js
Created March 4, 2018 13:51
PoC discord realtime message decryption engine
(() => {
let styles = `
.un-decryptable,
.encrypted-msg {
background-color: rgba(255, 141, 0, 0.29);
padding: 5px;
border-radius: 5px;
}
.un-decryptable::before,
.encrypted-msg::before {
@samdenty
samdenty / README.MD
Last active June 7, 2024 10:02
VS Code CSS addition to increase readability on file tree.

How to install

Custom CSS plugin

Install the custom CSS plugin, then make a file on your computer that will hold your custom CSS, I like to make one in my home directory called ~/.vscodestyles.css and then add the CSS into it.

Once done, open your command palette and select enable custom CSS and JS