# in one terminal
docker run -it --rm -p 27017:27017 mongo:7
This file contains hidden or 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
# if myservice hangs when you run | |
sudo systemctl restart myservice | |
# the check it's dependencies and whats trying to run | |
sudo systemctl list-dependencies myservice | |
sudo systemctl list-jobs | |
# The job that's "start running" is the blocker |
This file contains hidden or 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
git log -S 'this string changed in this file' -- main.sh |
# in one terminal
docker run -it --rm -p 27017:27017 mongo:6
This file contains hidden or 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
#!/usr/bin/env bash | |
set -e | |
# check if disk is attached | |
sda1_attached=false | |
sdb1_attached=false | |
if lsblk | grep -q "sda1"; then | |
sda1_attached=true |
This file contains hidden or 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 chatgpt | |
// list all event listeners on process | |
const eventNames = process.eventNames(); | |
eventNames.forEach((eventName) => { | |
const listeners = process.listeners(eventName); | |
console.log(`Event: ${eventName}`); | |
console.log(`Listeners:`); | |
listeners.forEach((listener, index) => { | |
console.log(` Listener ${index + 1}: ${listener.toString()}`); | |
// Note: listener.toString() might not always give meaningful information, |
This file contains hidden or 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
docker run -it --rm --init "${DOCKER_IMAGE}" |
This file contains hidden or 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
kill -STOP "${PID}" | |
kill -CONT "${PID}" |
This file contains hidden or 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 Benchmark = require('benchmark'); | |
suite | |
.add('test1', function() { | |
console.log('stuff'); | |
}) | |
.add('test2', function() { | |
console.log('stuff'); | |
}) | |
.on('cycle', function(event) { |
This file contains hidden or 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
asdf plugin add gcloud https://github.com/jthegedus/asdf-gcloud | |
echo "gcloud 410.0.0" >> ~/.tool-versions | |
asdf install | |
gcloud auth login | |
gcloud projects list | |
gcloud config set project $GCP_PROJECT_ID | |
# pull logs from cloudbuild | |
# add grep to this command for specific hash.. then cut -d' ' -f1 for the ID.. maybe can filter directly |
NewerOlder