Skip to content

Instantly share code, notes, and snippets.

View b00f's full-sized avatar

b00f

View GitHub Profile
@b00f
b00f / wallpaper-ng.perl
Last active May 15, 2022 09:59
A perl script to set National Geographic (photo of the day) as wallpaper
#!/usr/bin/perl
use strict;
use LWP::Simple;
my $url = "https://www.nationalgeographic.com/photography/photo-of-the-day";
my $desc_regex = qr/description\" content=\"(.*?)\"/mp;
my $url_regex = qr/twitter:image:src\" content=\"(.*?)\"/mp;
my $path_regex = qr/[^\/]+$/mp;
@b00f
b00f / commit-msg
Last active June 17, 2020 07:08 — forked from bean5/commit-msg
git commit-msg hook, Hunspell spellchecking with custom dictionary
#!/usr/bin/env ruby
# 1. Install hunspell
# $ pacman -S hunspell
# 2. Download a dictionary and install it in a path listed by `hunspell -D`
# $ open http://wiki.services.openoffice.org/wiki/Dictionaries
# 3. Move this file into your repository
# $ mv commit-msg /path/to/repo/.git/hooks
@b00f
b00f / wallpaper-ng.sh
Last active March 4, 2020 11:22
National Geographic - Photo of the day -
#!/bin/bash
ng_json_url="https://www.nationalgeographic.com/photography/photo-of-the-day/_jcr_content/.gallery.json"
path="$HOME/Pictures/Wallpapers/"
mkdir -p $path
echo "Pinging NG API..."
# Fetching API response.
@b00f
b00f / char.zsh
Last active November 19, 2019 10:32
random prefix symbol for spaceship-prompt plugin
#
# Prompt character
#
# ------------------------------------------------------------------------------
# Configuration
# ------------------------------------------------------------------------------
PREFIXES="πŸš€πŸ”—πŸ”‘πŸπŸ›ΈπŸš½πŸ«β›½πŸ‘½πŸ‘»πŸ’€πŸ’¨πŸŒ΅πŸ¦πŸΎπŸ¦ˆπŸ³πŸ¦„β˜•βš½πŸŽ―πŸŽΎπŸ“‘πŸ“ΊπŸ’ΈπŸ”“πŸš¬β›”πŸšΎβž°βšͺπŸ”±"
SPACESHIP_CHAR_PREFIX="${SPACESHIP_CHAR_PREFIX=""}"
SPACESHIP_CHAR_SUFFIX="${SPACESHIP_CHAR_SUFFIX=""}"
@b00f
b00f / wallpaper-bing.sh
Last active May 15, 2022 09:59
Download bing wallpaper
#!/bin/bash
# author: Whizzzkid ([email protected])
# Base URL.
bing="http://www.bing.com"
# API end point.
api="/HPImageArchive.aspx?"
# Response Format (json|xml).