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/local/bin/node | |
| /** | |
| * Node script to convert kindle notes into | |
| * ./kindleParse.js > myClippings.md | |
| */ | |
| const endOfLine = "\r\n"; | |
| const kindleNoteDelimiter = "==========" + endOfLine; | |
| const titlePrefix = endOfLine + "# "; | |
| const titleSuffix = endOfLine + endOfLine; |
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 API_KEYS = { | |
| 'prod': { | |
| 'key': '', | |
| 'secret': '', | |
| }, | |
| 'uat': { | |
| 'key': '', | |
| 'secret': '', | |
| } | |
| }; |
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
| # crypt all txt files into .env and delete source | |
| OPENSSL_BIN="/usr/local/Cellar/[email protected]/1.1.1g/bin/openssl" | |
| PASSWORD="password-changeme" | |
| for TXT in ~/path/to/*.txt; do | |
| test -f $TXT && \ | |
| $OPENSSL aes-256-cbc -pbkdf2 -a -salt -in "${TXT}" -out "${TXT}.enc" -pass pass:${PASSWORD} && \ | |
| rm -f "${TXT}" | |
| done |
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
| # copiata pari pari da https://aws.amazon.com/blogs/messaging-and-targeting/forward-incoming-email-to-an-external-destination/ | |
| # https://docs.aws.amazon.com/lambda/latest/dg/with-s3.html | |
| import os | |
| import boto3 | |
| import email | |
| import re | |
| from botocore.exceptions import ClientError | |
| from email.mime.multipart import MIMEMultipart |
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
| 'use strict'; | |
| function shuffle(array) { | |
| let currentIndex = array.length, temporaryValue, randomIndex; | |
| // While there remain elements to shuffle... | |
| while (0 !== currentIndex) { | |
| // Pick a remaining element... | |
| randomIndex = Math.floor(Math.random() * currentIndex); |
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
| DRIVE_DIR=$HOME/Google\ Drive/My\ Drive/Backups/intellij-scratches | |
| INTELLIJ_DIR=$HOME/Library/Application\ Support/JetBrains/IntelliJIdea2024.2/scratches | |
| mkdir $DRIVE_DIR | |
| mv $INTELLIJ_DIR/* $DRIVE_DIR/ | |
| rmdir $INTELLIJ_DIR | |
| ln -s $DRIVE_DIR $INTELLIJ_DIR | |
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
| # replace xxx with what you get from "piactl get region" | |
| # every 5 minutes, 9 to 18 mon-fri | |
| */5 9-18 * * 1-5 [[ $(/usr/local/bin/piactl get region) == "xxxx" ]] || (/usr/local/bin/piactl set region xxxx; /usr/local/bin/piactl connect) |
OlderNewer