https://learning.oreilly.com/profile/
console.log(JSON.stringify(document.cookie.split(';').map(c => c.split('=')).map(i => [i[0].trim(), i[1].trim()]).reduce((r, i) => {r[i[0]] = i[1]; return r;}, {})))
# Creates a dated subfolder in the current directory, adds a readme.md file if missing, and compresses the entire folder into a ZIP backup. Includes error handling for the backup process. | |
$currentDate = (Get-Date).ToString("yyMMdd") | |
# TODO: check backupFilePath | |
$backupFilePath = "$env:USERPROFILE\.bkp\$currentDate.zip" | |
$currentDirectory = Get-Location | |
$datedSubfolderPath = Join-Path -Path $currentDirectory -ChildPath $currentDate | |
$readmeFilePath = Join-Path -Path $datedSubfolderPath -ChildPath "readme.md" |
git clone --depth 1 --branch main |
#!/bin/bash | |
# Check if a project ID was provided | |
if [[ "$1" == "--help" || "$1" == "-h" ]]; then | |
echo "Usage: $(basename "$0") <gcp_project_id>" | |
echo "This script authenticates and configures gcloud for the specified GCP project." | |
exit 0 | |
fi |
import subprocess | |
import sys | |
import requests | |
from pathlib import Path | |
REPO = "paths_" | |
WKHTMLTOPDF_PATH = r"C:\git\py_fetch_skillboost\wkhtmltox\bin\wkhtmltopdf.exe" | |
def fetch_and_save_html(path_id, input_path_html): | |
url = f"https://partner.cloudskillsboost.google/paths/{path_id}" |
from yt_dlp import YoutubeDL | |
import os | |
import json | |
import html | |
import re | |
import http.server | |
import socketserver | |
import threading | |
# Directory to store videos |
rsync -avz --exclude='.git/' --exclude='.venv/' --exclude='__pycache__' --exclude='.pytest_cache' ./kb.oreilly.git/ /mnt/c/Users/mario/Dropbox/kb.oreilly.git |
find . -name "*.Identifier" -type f -print0 | xargs -0 rm |
function check_venv() { | |
# Check if we're entering a directory with a .venv | |
if [ -d "./venv" ]; then | |
echo "!!! deleting venv " | |
rm -rf venv | |
fi | |
if [ -d "./.venv" ]; then | |
if [ -n "$OLDPWD" ] && [ "$PWD" != "$OLDPWD" ]; then | |
echo "folder changed..." | |
python_path=$(which python 2>/dev/null) |
#!/bin/bash | |
# set -eox pipefail | |
update_0to100() { | |
cd ../0to100.git | |
pwd | |
git switch main | |
git pull | |
} |