This file contains 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
HISTFILE=~/.zsh_history | |
HISTSIZE=10000 | |
SAVEHIST=10000 | |
setopt append_history | |
setopt share_history | |
setopt inc_append_history | |
# Make ls use colors | |
export CLICOLOR=1 | |
alias ls='ls -Fa' |
This file contains 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 filter-branch --commit-filter ' | |
if [ "$GIT_COMMITTER_EMAIL" = "<old-email>" ]; | |
then | |
GIT_COMMITTER_NAME="<name>"; | |
GIT_AUTHOR_NAME="<name>"; | |
GIT_COMMITTER_EMAIL="<noreply-email>"; | |
GIT_AUTHOR_EMAIL="<noreply-email>"; | |
git commit-tree "$@"; | |
else | |
git commit-tree "$@"; |
This file contains 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
import { access, readFile } from 'fs/promises'; | |
import { join, resolve, dirname } from 'path'; | |
import { TSConfig } from './types'; | |
import { sync as globSync } from 'glob'; | |
import { parse as parseJSON } from 'json5'; | |
import { DiscoveryError } from './exceptions'; | |
async function getRootAppDir(): Promise<string> { | |
const appDir = process.env.PWD; | |
if (appDir) { |
This file contains 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
// This script prompts the user to enter a memory address and either increments or decrements it, maintaining the format. | |
// It also saves the new address to a file for use in subsequent runs. | |
// Define the file path | |
const filePath = FileManager.local().documentsDirectory() + "/memory_address.txt"; | |
// Read the last saved address or use a default address | |
let lastAddress; | |
if (FileManager.local().fileExists(filePath)) { | |
lastAddress = FileManager.local().readString(filePath); |
This file contains 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
[{"id":"5a7d710eff9ddb36","type":"tab","label":"Get new posts from blog","disabled":false,"info":"","env":[]},{"id":"5470137f70f4ca7a","type":"feedparse","z":"5a7d710eff9ddb36","name":"","url":"https://enginerd.io/feed.xml","interval":"15","ignorefirst":true,"x":200,"y":140,"wires":[["814eb66a93a3e2e8"]]},{"id":"814eb66a93a3e2e8","type":"html","z":"5a7d710eff9ddb36","name":"","property":"payload","outproperty":"paragraphs","tag":"p","ret":"html","as":"single","x":170,"y":260,"wires":[["9c52eb61bd7cdaa6"]]},{"id":"29eb8d41a3eb35c6","type":"function","z":"5a7d710eff9ddb36","name":"get summary","func":"const summary = [];\nconst cleanedUpPayload = msg.payload.replace(/\\n/g, '').trim();\nconst publishedPosts = (cleanedUpPayload) ? cleanedUpPayload.split(',') : [];\nlet readMore = false;\n\nif (publishedPosts.includes(msg.topic)) return [null, null];\n\nfor (let i = 0; i < msg.paragraphs.length; i++) {\n summary.push(msg.paragraphs[i]);\n if (msg.paragraphs[i].includes('<!--more-->')) {\n summary[i] |
This file contains 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 | |
# Define the target directory | |
if [ -n "$1" ]; then | |
# check if the specified directory exists | |
if [ ! -d "$1" ]; then | |
echo "Directory $1 does not exist." | |
exit 1 | |
fi | |
TARGET_DIR=$1 |