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 | |
| if ! command -v jq &> /dev/null; then | |
| echo "Error: jq is not installed. Please install jq to use this script." | |
| exit 1 | |
| fi | |
| convert_timestamp() { | |
| if [[ "$OSTYPE" == "darwin"* ]]; then | |
| date -r "$1" -u "+%Y-%m-%d %H:%M:%S UTC" |
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 | |
| unix_to_datetime() { | |
| if command -v gdate >/dev/null 2>&1; then | |
| gdate -u -d "@$timestamp" +"%Y-%m-%d %H:%M:%S" | |
| elif [[ "$OSTYPE" == "darwin"* ]]; then | |
| date -u -r "$timestamp" +"%Y-%m-%d %H:%M:%S" | |
| else | |
| date -u -d "@$timestamp" +"%Y-%m-%d %H:%M:%S" | |
| fi |
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
| package main | |
| import ( | |
| "bufio" | |
| "encoding/json" | |
| "fmt" | |
| "net/url" | |
| "os" | |
| "strings" | |
| ) |
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
| # write to ~/.oh-my-zsh/themes/minimal-3.zsh-theme | |
| # then set ~/.zshrc ZSH_THEME='minimal-3' | |
| # Define colors | |
| autoload -U colors && colors | |
| SUCCESS_COLOR=$fg[green] | |
| ERROR_COLOR=$fg[red] | |
| TEXT_COLOR=$fg[black] # Set printout text color to black | |
| RESET_COLOR=$reset_color |