Skip to content

Instantly share code, notes, and snippets.

View its-arun's full-sized avatar

Arun Chaudhary its-arun

View GitHub Profile
@its-arun
its-arun / panels.py
Created September 25, 2024 04:55
Panels Wallpapers Downloader
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()
@its-arun
its-arun / blurhashDataURL.ts
Created September 5, 2024 15:07 — forked from mattiaz9/blurhashDataURL.ts
Convert blurhash to a base64 DataURL string (no canvas or node-canvas)
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
}
@its-arun
its-arun / DynamicMOTD.sh
Created February 11, 2018 06:25
Dynamic MOTD for MacOS using lolcat, cowsay and fortune.
#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