Skip to content

Instantly share code, notes, and snippets.

View cirrusUK's full-sized avatar
💭
Dunroamin, Duncarin, Dunlivin.

cirrus cirrusUK

💭
Dunroamin, Duncarin, Dunlivin.
View GitHub Profile
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
/*
MIT License
Copyright (c) 2014 Christian Weyer
#!/bin/sh
# install AUR packages with cower
cd $HOME/build/aur && cower -d "$1"
builddir="$_"
cd "$builddir" && ${EDITOR:-nano} PKGBUILD
makepkg -sirc && cd - &>/dev/null
read -p "Remove Build directory? [Y/n]? " yn
@cirrusUK
cirrusUK / bashfan
Created May 30, 2020 19:57
shell script to control fan settings on thinkpad (x220)
#!/bin/bash
# (1) prompt user, and read command line argument
red=`tput setaf 1`
green=`tput setaf 2`
yellow=`tput setaf 3`
printf %"s\n"
printf %"s\n"
tput setaf 3
blue=`tput setaf 4`
#!/bin/bash
# free keys complements of pastebin, and wtf goofle why AIza
keylist=(
"AIzaSyAafvOlmpO-nhRMdTKhwcK2jVQ8XeZwBfg"
"AIzaSyAAW1uwHofZ7c1zxl75u0flELX5PMs2LvM"
"AIzaSyA8OmKcw2DMNkJicyCJ0vqvf90xgeH52zE"
"AIzaSyBSnh-sIjd97_FmQVzlyGbcaYXuSt_oh84"
"AIzaSyBBcXtLP34Evs2rrdvYyZ63qbY36bQ96wk"
"AIzaSyCQu8QRr-9H_qyWvbXpL6jseGthkd1VCtw"
#!/bin/bash
dir=("$HOME"/.config/base16-shell/scripts)
url=$(find "${dir[@]}" -maxdepth 6 -type f -name '*.sh' \
| shuf | dmenu -l 17 -p theme:➤ )
eval sh ${url}
# | cut -c 24- | shuf | sed 's/....$//' |
@cirrusUK
cirrusUK / invenv.py
Created April 10, 2020 15:58
show if virtualenv is activated
#!/usr/bin/python
import os
if os.getenv('VIRTUAL_ENV'):
print('Virtualenv Is Active')
else:
print('Virtualenv Is Not Active')
#!/usr/bin/env bash
# deps: sacad feh fancy_audio [rubygem]
# opt deps: optipng jpegoptim
tput setaf 5
read -p "enter name of artist album art: " artist
tput setaf 1
read -p "enter name of the album requiring art: " album
tput setaf 6
~/venv/bin/sacad -v normal "${artist}" "${album}" 150 ~/"${album}.jpg"
read -p "View Downloaded Album Art $fehview? [yn] " answer
#!/bin/bash
dmenu_text=$(cat /home/cirrus/Documents/mp3.txt | shuf | bemenu -l 17 -p PLay)
dmenu_exec=$( mpv $dmenu_text )
exec $dmenu_exec
#!/bin/bash
## edit dir=("$HOME"/your/own/path/to/Music/dir)
dir=("$HOME"/Music/mp3)
dmenu_text=$( find "${dir[@]}" -maxdepth 6 -type f -name '*.mp3' \
| cut -c 24- | shuf | sed 's/....$//' | dmenu -nb "#303030" -nf "#f5e5d5" -sf "#d79921" -sb "#191919" -l 17 -p PLay)
## mpv will show embedded album art, edit path as line 3 dir= "/your/own/path/to/Music/dir/$dmenu_text.mp3"
mpv --no-osd-bar --ontop --no-config --geometry=150x150+1192+600 --autofit-smaller=150x150 "/home/cirrus/Music/mp3/$dmenu_text.mp3"