Skip to content

Instantly share code, notes, and snippets.

View check
ls /directory/Show/Season\ number/ | cut -d '-' -f3- | cut -d '[' -f2- | column -t
pueue add --stashed --label rclone -- "rclone copy put-io: --checksum --stats-one-line-date --stats-log-level NOTICE 2>&1"

from IRC channel:

17:17:39 <dirtwash> wowas: no
17:17:51 <dirtwash> wowas: out + purge, no further steps needed to remove
17:18:03 <dirtwash> purge command does everything
18:50:43 <devster> anyone can figure out what's wrong with this ceph-osd (in docker with ceph-ansible) that keeps crashing? It's a single OSD that keeps going up and down every 3 minutes almost exactly...
18:55:44 <dirtwash> devster: just purge it and redo, had this few times, could be any number of known bugs
18:55:59 <dirtwash> devster: or ask on ML
18:56:03 <dirtwash> there wont be an answer here
18:58:20 <devster> thanks dirtwash never did a purge with ceph-ansible
ffmpeg -hide_banner -y \
  -c:a aac -ar 48000 \
  -c:v h264 -profile:v baseline \
  -crf 20 -sc_threshold 0 \
  -pix_fmt yuv420p -hls_time 10 \
  -strict -2 -vsync 2 \
  -vf scale=w=<vwidth>:h=<vheight> \
  -b:v <vbrate> -maxrate <maxrate> \
  -bufsize <bufsize> -b:a 96k \
awk '!visited[$0]++' your_file > deduplicated_file
  • The awk "script" !visited[$0]++ is executed for each line of the input file.
  • visited[] is a variable of type associative array (a.k.a. Map). We don't have to initialize it because awk will do it the first time we access it.
  • The $0 variable holds the contents of the line currently being processed.
  • visited[$0] accesses the value stored in the map with a key equal to $0 (the line being processed), a.k.a. the occurrences (which we set below).
import requests
from bs4 import BeautifulSoup
css = """
table {
color: #666;
font-family: 'Raleway', sans-serif;
font-size: 16px;
font-weight: 400;
devster31 / tasks.jsonc
Created Feb 11, 2020
yamllint Visual Studio Code task
View tasks.jsonc
// See
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
"label": "yamllint",
"type": "shell",
"command": "/usr/local/bin/yamllint",
"args": [

query is not returning an empty list.

  • Bug Report
View hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
devster31 / joseph_reagle.bash
Last active Feb 23, 2019
ssh-agent automation done well
View joseph_reagle.bash
function start_agent {
echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
devster31 /
Created Feb 25, 2018
messy post-processing
#!/bin/bash -u
file=$1 # {f}
location=$2 # {f.dir.dir}
database=${3} # {info.DataBase}
id=${4:-x} # {}
name="${5}" # {info.Name}
if [[ ! -f "$1" ]]; then