Skip to content

Instantly share code, notes, and snippets.

View Patrick-web's full-sized avatar

Just Patrick Patrick-web

View GitHub Profile
@Patrick-web
Patrick-web / parser.js
Created September 26, 2021 02:18
JSON Bible Parser
const path = require("path");
const fs = require("fs");
function parseBible(biblePath) {
console.time("parsing time");
const files = fs.readdirSync(biblePath);
files.filter((file) => file == "books.json");
const bookNames = JSON.parse(
fs.readFileSync(path.join(biblePath, "books.json"))
).bookNames;
@Patrick-web
Patrick-web / eas_update_prompt.sh
Created November 18, 2023 15:49
A Bash script that interactively prompts users to select a branch and a commit message for updating an EAS project. It provides options to choose from available branches and recent commit messages, allowing confirmation before executing the 'eas update' command. Designed for convenience and ease of use in managing EAS project updates.
#!/bin/bash
# Function to extract branches from eas.json under the build section
get_branches() {
branches=$(jq -r '.build | to_entries[] | [.key] | @tsv' eas.json)
echo "$branches"
}
echo "Available branches:"
available_branches=$(get_branches)