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 os | |
import requests | |
import json | |
from urllib.parse import urlparse, unquote | |
def load_json_from_url(url): | |
try: | |
response = requests.get(url) | |
response.raise_for_status() | |
return response.json() |
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 { decode } from "blurhash" | |
export function blurHashToDataURL(hash: string | undefined): string | undefined { | |
if (!hash) return undefined | |
const pixels = decode(hash, 32, 32) | |
const dataURL = parsePixels(pixels, 32, 32) | |
return dataURL | |
} |
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
#Before running script give permission using "chmod +x DynamicMOTD.sh" | |
#Install Homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
#Install Lolcat, Cowsay and Fortune | |
brew install lolcat | |
brew install cowsay | |
brew install fortune | |
#Configuring .bash_profile and .bashrc |