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
#!/bin/bash | |
# Navigate to the directory containing the docker-compose.yaml file | |
cd /path/to/docker-compose.yaml || exit | |
# Pull the latest images for all services | |
docker-compose pull | |
# Get the list of services from the docker-compose file | |
services=$(docker-compose config --services) |
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
# bash one liner for listing all root directories where containers are being run from | |
docker ps | awk '{ print $1 }' | tail -n +2 | xargs -n1 docker container inspect $container | jq -r '.[].Config.Labels."com.docker.compose.project.config_files"' | sort | uniq |
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 python3 | |
import os | |
problems = { | |
"problems": { | |
"Array": { | |
"two-sum": { | |
"name": "Two Sum", | |
"premium": False, |
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
GITHUB_USER=user | |
GITHUB_TOKEN=github_pat_abcdefghijklmnopqrstuvwxyz0123456789 |
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
version: "3.8" | |
services: | |
changedetection: | |
container_name: changedetection | |
hostname: changedetection | |
image: ghcr.io/dgtlmoon/changedetection.io:latest | |
environment: | |
- TZ=America/Los_Angeles | |
- PLAYWRIGHT_DRIVER_URL=ws://playwright-chrome:3000/?stealth=1&--disable-web-security=true&token=<redacted> |
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
alias ssh='ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no"' |
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 python3 | |
import multiprocessing | |
import random | |
import time | |
class Worker(multiprocessing.Process): |
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
[ | |
{ | |
"form": "1", | |
"description": "Application for registration or exemption from registration as a national securities exchange (PDF)", | |
"last_updated": "Feb 1999", | |
"sec_number": "SEC1935", | |
"topics": [ | |
"Self-Regulatory Organizations" | |
] | |
}, |
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
# automate sourcing virtualenv if venv dir in local dir. | |
function cd() { | |
builtin cd "$@" | |
if [[ -z "$VIRTUAL_ENV" ]] ; then | |
## If venv folder is found then activate the vitualenv | |
if [[ -d ./venv ]] ; then | |
source ./venv/bin/activate | |
fi | |
else |
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/bash | |
cat .env | awk -F"\=" '{ print $1 }' | grep -v -e '^$' | while read line; do echo "ENV $line=\"\""; done |
NewerOlder