Skip to content

Instantly share code, notes, and snippets.

View victusfate's full-sized avatar

Mark Essel victusfate

View GitHub Profile
victusfate /
Last active February 23, 2024 15:02
python dependencies macOS M2
brew reinstall openssl gettext readline sqlite3 xz zlib tcl-tk
victusfate / gist:6662335665490758720e7ff8f9c40937
Created October 26, 2023 14:55
# Stash the changes: This will take your current changes and stash them.
git reset HEAD~1
# Copy code
git stash
#Switch to the desired branch:
git checkout [branch-name]
# Apply the stash to the branch:
victusfate / sample.vue
Created July 31, 2023 15:23
simple vue sample with interactive date inputs
<div class="flex justify-between">
<label class="tw-inline-block tw-pt-2 tw-leading-tight tw-mb-1 tw-text-base mr-2">Start Date</label>
<input type="date" id="start_date" v-model="start_date" class="mb-4 w-32 h-8" />
<label class="tw-inline-block tw-pt-2 tw-leading-tight tw-mb-1 tw-text-base mr-2">End Date</label>
<input type="date" id="end_date" v-model="end_date" class="mb-4 w-32 h-8" />
victusfate /
Last active February 16, 2024 16:11
install redis-inventory and go
trying first
install go 1.15
git clone
sudo wget
sudo tar -C /usr/local -xzf go1.15.5.linux-amd64.tar.gz
Dijkstra's algorithm is a popular algorithm used to find the shortest path between two nodes in a graph. It is a greedy algorithm that iteratively expands the frontier of visited nodes from the starting node towards the target node, while updating the cost of each node. The algorithm maintains a priority queue of nodes to visit, with the node with the lowest current cost at the front of the queue.
Here are the basic steps of Dijkstra's algorithm:
Initialize the cost of the starting node to 0, and the cost of all other nodes to infinity.
Add the starting node to the priority queue.
While the priority queue is not empty:
Remove the node with the lowest cost from the priority queue (call it "current").
For each neighbor of "current":
Calculate the cost of getting to that neighbor through "current".
const fs = require('fs')
if (process.argc < 3) {
console.log('Usage: node timing.js <filename>')
const sFile = process.argv[2]
export default function AppWs() {
const [isPaused, setPause] = useState(false);
const ws = useRef(null);
useEffect(() => {
ws.current = new WebSocket("wss://");
ws.current.onopen = () => console.log("ws opened");
ws.current.onclose = () => console.log("ws closed");
const wsCurrent = ws.current;
victusfate /
Created May 20, 2021 20:38
thread safe multiprocess python dictionary example
from multiprocessing import Process, Manager
manager = Manager()
d = manager.dict()
def f():
# the __str__() method of a dict object invokes __repr__() on each of its items,
# so explicitly invoking __str__() is required in order to print the actual list items
print({k: str(v) for k, v in d.items()}
victusfate /
Created May 5, 2021 15:17
Alela Brawl Deck

Commander 1 Alela, Artful Provocateur (ELD) 324

Deck 1 Righteous Valkyrie (KHM) 24 1 Glacial Floodplain (KHM) 257 6 Snow-Covered Swamp (KHM) 281 1 Lagonna-Band Storyteller (THB) 27 1 Demonic Embrace (M21) 95 6 Snow-Covered Plains (KHM) 276

This file has been truncated, but you can view the full file.