Skip to content

Instantly share code, notes, and snippets.

View streetturtle's full-sized avatar
:octocat:
Build software people love

streetturtle

:octocat:
Build software people love
View GitHub Profile
@streetturtle
streetturtle / pixelate-screenshot.sh
Last active March 9, 2019 01:49
Make screenshot, pixelate, save.
#!/usr/bin/env bash
ffmpeg -loglevel panic\
-f x11grab\
-video_size $(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/')\
-y -i :0.0\
-vf frei0r=pixeliz0r\
-vframes 1\
/tmp/i3lock.png
function prepareForScreenshot(selector) {
var textElements = document.querySelectorAll(selector);
for (i = 0; i < textElements.length; ++i) {
textElements[i].innerHTML = randomiseString(textElements[i].textContent);
}
var imgElements = document.querySelectorAll('img');
for (i = 0; i < imgElements.length; ++i) {
imgElements[i].style.filter = 'blur(7px)';
}
@streetturtle
streetturtle / sp
Last active April 29, 2024 03:13 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/bin/bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#