Skip to content

Instantly share code, notes, and snippets.

View uriel1998's full-sized avatar

Steven Saus uriel1998

View GitHub Profile
@uriel1998
uriel1998 / gist:14f8b7e931ba4dbf65e62618d276c6c5
Created August 30, 2021 18:46
top level tld for filtering in a pastebin type of application
.ac, .act, .ad, .ae, .aero, .af, .ag, .ai, .al, .am, .an, .ao, .ar, .arpa, .as, .at, .au, .aw, .ax, .az, .bb, .bd, .be, .bf, .bm, .bn, .bo, .br, .bs, .bt, .bw, .by, .ca, .cc, .cd, .ch, .ck, .cn, .co, .com, .cr, .cu, .cx, .cy, .dm, .do, .domains, .dz, .ec, .ee, .eg, .es, .et, .fi, .fj, .fk, .fr, .ge, .gg, .gh, .gi, .gn, .gp, .gr, .hk, .hn, .hr, .ht, .hu, .id, .ie, .il, .im, .in, .ip6.arpa, .ir, .it, .je, .jm, .jo, .jp, .kh, .kr, .kw, .ky, .kz, .lb, .lc, .level, .li, .lk, .lr, .ls, .lt, .lu, .lv, .ly, .ma, .mc, .mg, .mil, .mk, .mo, .mobi, .mt, .mu, .mv, .mw, .mx, .my, .ng, .ni, .nl, .no, .np, .nr, .nsw, .nt, .nz, .om, .or, .pa, .pe, .pf, .pg, .ph, .pk, .pl, .plp, .pr, .pro, .ps, .pt, .py, .qld, .ro, .ru, .rw, .sa, .sb, .sc, .sd, .se, .sg, .sv, .sy, .tas, .th, .tj, .tn, .to, .tp, .tr, .tt, .tv, .tw, .tz, .ua, .ug, .uk, .us, .uses, .uy, .va, .ve, .vi, .vic, .vn, .wa, .ye, .yu, .za, .zm, .zw
@uriel1998
uriel1998 / gist:a1f4b41cd37c58dcd5225727d6378ce0
Created August 26, 2021 23:30
mpdq systemd service file
[Unit]
Description=Start mpdq service
After=mpd.service
[Service]
Type=simple
RemainAfterExit=yes
User=rock64
Group=rock64
ExecStart=/home/rock64/apps/bin/mpdq-start.sh
@uriel1998
uriel1998 / gist:3c67ae0a96c4d6c58b5a0b26e0b207ea
Created August 26, 2021 23:25
/etc/asoundrc for Rock64 with Ayufan Kernel
defaults.ctl.card 1
defaults.pcm.card 1
defaults.pcm.device 0
pcm.dmixed {
type dmix
ipc_key 1027
# ipc_key_add_uid 0
ipc_perm 0660
slave {
@uriel1998
uriel1998 / volume.rb
Created February 10, 2012 17:55 — forked from jaspervdj/volume.rb
Set PulseAudio volume, mute, unmute, and change default sink (and automagically switch running audio streams) from the commandline
#!/usr/bin/ruby
#
# Moved to: https://github.com/uriel1998/volumerb
#
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
# Unported License. To view a copy of this license, visit
# http://creativecommons.org/licenses/by-sa/3.0/.
#
# Forked/derived from original by Jasper Van der Jeugt (jaspervdj);
@uriel1998
uriel1998 / smallcoverkill.sh
Created November 17, 2012 01:34
Small bash script to remove small cover images (or really, any small resolution images)
#! bin/bash
cd ~/Music
echo "Run this script from your base music directory (or wherever you want to purge png and jpg images from)"
echo "Currently in $PWD"
echo "What is the minimum resolution you want?"
read request
# test for number without decimal
if [ "$request" -eq "$request" ] 2>/dev/null; then
echo "Finding jpg covers."
find . -iname "*.jpg" -exec ls -f '{}' \; > tempfile.txt
@uriel1998
uriel1998 / style.css
Created November 25, 2012 17:08
CSS stylesheet for ePub
/* You may notice that my CSS file is organized in a fairly straightforward and */
/* static way. This is intentional, folks. You can do a LOT fancier - but I'm */
/* operating under a KISS principle here. Otherwise it's too easy to have more */
/* than one style applying to any line and making troubleshooting difficult. */
/* My goal is portability and it NEVER distracting from the text. */
/* Put any additional fonts you REQUIRE here. I recommend using additional fonts */
/* only when you MUST; and always define a fallback. Please note that if you have */
/* the font in a sub-directory, you must define it properly in the src portion */
@uriel1998
uriel1998 / newwall.sh
Created February 13, 2014 22:13
Background manager, setter, tiler, mirrorer, etc - using mostly feh and imagemagick
#!/bin/bash
# Quite a bit of inspiration from https://gist.github.com/brycied00d/1190483
# I have a lot of backgrounds, and a laptop. I use xinarama, so my DISPLAY is always 0:0
# But I wanted to have one randomizer that used feh (2.9.3 is the version I have) but actually showed resolution-appropriate images.
# I also wanted to be able to select the color - "tiled", "orange", "blue", "black", "simple", "wide" (hooray for symlinks) at times.
# Uses xrandr to see if there is an HDMI monitor attached (which in my use cases always means I am rocking two monitors
#sets background
@uriel1998
uriel1998 / toodt.sh
Created April 25, 2014 01:50
A quick shell script to use pandoc to convert markdown to libreoffice and open it.
#!/bin/bash
# usage:
if [ -f "$1" ]; then
file=$(basename "$1")
filename=${file%.*}
pandoc "$1" -V geometry:margin=1in -s -o "$filename".odt
lowriter "$filename".odt
fi
@uriel1998
uriel1998 / subdir_copy.sh
Created August 14, 2016 15:09
Small shell script to copy each file in a directory into a subdirectory named the same as the filename (but not extension!) and then move the file into it.
#!/bin/bash
dir=$(echo "$PWD")
for f in *
do
if [ -f "$f" ];then
# this is redundant due to how I'm searching, but why not?
filename=$(basename "$f")
extension="${filename##*.}"
@uriel1998
uriel1998 / plaintext-convert.sh
Last active October 15, 2020 04:17 — forked from sbrl/plaintext-convert.sh
Converter for pirate/bookmark-archiver that converts a plain-text list of urls into something it can understand.
#!/bin/bash
#set -o errexit
#set -o nounset
##############
# This program converts a plain-text list of urls to the
# bookmark-archiver HTML format.
#
# Requirements: curl, xidel
# Usage: