Skip to content

Instantly share code, notes, and snippets.

@Fraasi
Fraasi / cal.py
Last active August 4, 2022 15:46
Simple (unix like) command line calendar in python
#!/usr/bin/env python
"""Simple (unix like) command line calendar in python"""
import os
from datetime import datetime
import argparse
import calendar
@Fraasi
Fraasi / wttr.sh
Last active January 5, 2023 23:51
simple wrapper function around http://wttr.io to get sensible defaults
#!/usr/bin/env bash
# simple wrapper function around http://wttr.io to get sensible defaults
# easily modified by changing the defaults and/or last parameters in the url
function wttr() {
USAGE="
Usage: wttr [OPTIONS]
Options:
-c <city> city name, double words with +, eg. new+york
@Fraasi
Fraasi / git-bash-symlink.sh
Created December 7, 2022 11:49
my old git-bash symlink function from my dotfiles install.sh
@Fraasi
Fraasi / cowsay-random-quote.sh
Created October 26, 2019 15:05
Curl random quote and pass it to cowsay
#!/bin/bash
declare -a MODES
MODES=("b" "d" "g" "p" "s" "t" "w" "y")
declare -a COWS
COWS=("tableflip" "aperture-blank" "beavis.zen" "bees" "biohazard" "box" "broken-heart" "cat" "cat2" "clippy" "cowfee" "cube" "default" "dragon" "hedgehog" "kilroy" "kosh" "nyan" "owl" "psychiatrichelp" "psychiatrichelp2" "shrug" "squirrel" "tux")
MODES_LENGTH=${#MODES[@]}
MODES_INDEX=$(($RANDOM % $MODES_LENGTH))
@Fraasi
Fraasi / soaper-dl.sh
Created March 31, 2024 14:41
Failed pr to KevCui/soaper-dl, which I like to keep around
#!/usr/bin/env bash
#
# Download TV series and Movies from Soaper using CLI
#
#/ Usage:
#/ ./soaper-dl.sh [-n <name>] [-p <path>] [-e <num1,num2,num3-num4...>] [-l] [-s] [-d]
#/
#/ Options:
#/ -n <name> TV series or Movie name
#/ -p <path> media path, e.g: /tv_XXXXXXXX.html