Skip to content

Instantly share code, notes, and snippets.

@phedders
phedders / a_enable_wireless.sh
Created August 10, 2023 17:47 — forked from telenieko/a_enable_wireless.sh
Sample files to enable wireless on Debian initramfs
#!/bin/sh
# this goes into /etc/initramfs-tools/scripts/init-premount/a_enable_wireless
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
@phedders
phedders / pipewire-in-default-switch.sh
Created November 25, 2021 00:02 — forked from miyl/pipewire-in-default-switch.sh
Pipewire default source (input) switching (Pulseaudio pactl)
#!/usr/bin/env sh
# Removing pulseaudio means removing pacmd, so this is an attempt at switching the default via pactl instead.
# It successfully sets the default - but I'm unsure whether programs still respect that default or not.
# Cycles through all sources and sets whatever is the next one as the default.
# Pass -g to just print the current default source
CUR_DEFAULT="$(pactl info | grep 'Default Source' | cut -d':' -f 2)"
SOURCES="$(pactl list short sources | cut -d' ' -f 2)"
@phedders
phedders / pipewire-out-default-switch.sh
Created November 25, 2021 00:02 — forked from miyl/pipewire-out-default-switch.sh
Pipewire default sink (output) switching (Pulseaudio pactl)
#! /usr/bin/env sh
# Removing pulseaudio means removing pacmd, so this is an attempt at switching the default via pactl instead.
# It successfully sets the default - BUT it appears my programs don't go to that default for some reason?
# Unlike the other scripts where sinks are specified, this just switches between whatever sinks exist.
# Sinks can be specified by name or index. Index changes sometimes when you disconnect and reconnect, restart or whatever, so names are better.
# Annoyingly the command used to switch audio over to a new sink cannot take a name as its argument, otherwise I'd only need the name here.
# TODO: Trigger a zenity or dmenu dialog with entr that asks whether to switch monitor and/or sound to hdmi? Could do
@phedders
phedders / alternating-sparkle-text.markdown
Created December 1, 2020 13:32
Alternating Sparkle Text

Alternating Sparkle Text

Using jQuery to assign and split classes. Result - alternating sparkly text. Defaults to color if not supported.

A Pen by Mark Sottek on CodePen.

License.

@phedders
phedders / css-glowing-particle-animation.markdown
Created November 14, 2019 18:48
CSS Glowing Particle Animation
@phedders
phedders / ambient-background.markdown
Created November 14, 2019 18:46
Ambient Background
@phedders
phedders / index.haml
Created November 14, 2019 18:44
Parallax Star background in CSS
<link href='https://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'>
#stars
#stars2
#stars3
#title
%span
PURE CSS
%br
%span
PARALLAX PIXEL STARS
@phedders
phedders / css-wave-animation-with-a-png.markdown
Created November 14, 2019 18:40
CSS Wave Animation with a .png
@phedders
phedders / index.html
Created November 14, 2019 18:32
Pure CSS Gradient Background Animation
<div class="container">
<h1>Pure CSS Animated Gradient Background</h1>
<h3><a href="https://codepen.io/P1N2O/full/pyBNzX" target="_blank">Full Screen <svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
width="18" height="18"
viewBox="0 0 172 172"
style=" fill:#000000;"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g fill="#eeeeee"><path d="M143.19336,21.43001c-0.26705,0.00844 -0.53341,0.03181 -0.79785,0.06999h-34.89551c-2.58456,-0.03655 -4.98858,1.32136 -6.29153,3.55376c-1.30295,2.2324 -1.30295,4.99342 0,7.22582c1.30295,2.2324 3.70697,3.59031 6.29153,3.55376h18.53256l-66.59961,66.59961c-1.8722,1.79752 -2.62637,4.46674 -1.97164,6.97823c0.65473,2.51149 2.61604,4.4728 5.12753,5.12753c2.51149,0.65473 5.18071,-0.09944 6.97823,
@phedders
phedders / index.html
Created November 14, 2019 18:28
rainbow lines of straightness
<canvas id=c></canvas>