Skip to content

Instantly share code, notes, and snippets.

View dylan-chong's full-sized avatar
💧
Elixiring

Dylan Chong dylan-chong

💧
Elixiring
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>3D Poker Chip Renderer</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/cannon@0.6.2/build/cannon.min.js"></script>
<style>
body {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>3D Poker Chip Renderer</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/cannon@0.6.2/build/cannon.min.js"></script>
<style>
body {
@dylan-chong
dylan-chong / poker-chip-forum-read-listings.js
Created September 7, 2025 22:08
Poker chip forum - grey out viewed listings
// ==UserScript==
// @name PokerChipForum Viewed Listings Tracker
// @namespace http://tampermonkey.net/
// @version 1.2
// @description Grey out viewed listings on PokerChipForum marketplace
// @author You
// @match https://www.pokerchipforum.com/*
// @grant none
// ==/UserScript==
-- See the most up to date version here where it says "Download the mrc-converter-suite zip archive" https://discussions.agilebits.com/discussion/30286/mrcs-convert-to-1password-utility/p1
--
-- Exports Safari's saved passwords to a CSV file formatted for use with the convert_to_1p4's csv converter
--
-- Version 1.4
-- mike (at) cappella (dot) us
--
use AppleScript version "2.5" -- runs on 10.11 (El Capitan) and later
use scripting additions
### Keybase proof
I hereby claim:
* I am dylan-chong on github.
* I am dylanchongspoke1 (https://keybase.io/dylanchongspoke1) on keybase.
* I have a public key ASBDqAf3Jipzu14Y7U2K4v7febrathxf1iVI8LAdJO7HaAo
To claim this, I am signing this object:
@dylan-chong
dylan-chong / do-not-disturb-toggler-high-sierra.scpt
Last active December 3, 2024 11:52
do-not-disturb-toggler-high-sierra.scpt
(* setDoNotDisturb function based on https://gist.github.com/Sanabria/40d80d84ec94644220489798f3aac930 *)
set workTimeLengthInSeconds to 60 * 10
set breakTimeLengthInSeconds to 60 * 1
on setDoNotDisturb(shouldBeOn)
(* Note 1: The 1 after menu bar may need to be changed to 2 when using multiple monitors *)
(* Note 2: For 10.11 and newer “NotificationCenter” is now spelled “Notification Center”*)
(* Note 3: The alert must be shown before toggling do not disturb mode, as doing the toggling requires pressing the option key, and we don't want to disturb the user's typing *)
tell application "System Events"
defprotocol P do
def x(p)
end
defimpl P, for: Integer do
def x(p) do
p + 1
end
end
@dylan-chong
dylan-chong / gist:a6ee667dd1ebdcc48b4d2546a8180776
Created December 26, 2023 03:22
Get HTML table data out into tsv
console.log(Array.from(document.querySelectorAll('tr')).map(tr => Array.from(tr.getElementsByTagName('td')).map(td => td.innerText).join('\t')).join('\n'))
@dylan-chong
dylan-chong / activity-monitor-memory-grouper.ex
Created October 3, 2023 03:21
Select all on the memory page of the Mac Activity Monitor and then run the script. It will add up how much all of the similar processes (e.g., add up to)
IO.puts "Reading activity monitor data from clipboard:"
{activity_monitor_data, 0} = System.cmd("pbpaste", [])
memory_grouped_by_name =
activity_monitor_data
|> String.split("\n")
|> Enum.filter(fn line ->
match? [_name, _size | _], String.split(line, "\t")
end)
|> Enum.map(fn line ->
var pattern = /\b(SEARCHTERM)\b/
Array
.from(document.getElementsByClassName("manhattan--container--1lP57Ag"))
.forEach(con =>
con
.querySelector("h1")
.innerHTML
.match(pattern)
|| con.remove()
)