Skip to content

Instantly share code, notes, and snippets.

View winny-'s full-sized avatar
👋
***status goes here***

Winston (Winny) Weinert winny-

👋
***status goes here***
View GitHub Profile
#!/bin/sh
# Try to reset pulseaudio after suspend.
# Todo: fix resume to not require this.
set -u
pulseaudio -k
pulseaudio --daemon
pkill -SIGHUP xfce4-panel
[731694.869009] ata1.00: exception Emask 0x0 SAct 0x100000 SErr 0x50000 action 0x6 frozen
[731694.869017] ata1: SError: { PHYRdyChg CommWake }
[731694.869025] ata1.00: failed command: WRITE FPDMA QUEUED
[731694.869038] ata1.00: cmd 61/00:a0:f0:2e:0d/08:00:06:00:00/40 tag 20 ncq dma 1048576 ou
[731694.869038] res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[731694.869042] ata1.00: status: { DRDY }
[731694.869050] ata1: hard resetting link
[731695.339011] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[731695.352595] ata1.00: configured for UDMA/133
[731695.352608] ahci 0000:00:12.0: port does not support device sleep
- name: set up a better cron
hosts: alpine
become: yes
tasks:
- name: Install fcron
apk:
name: fcron
state: present
- name: Stop and disable crond
service:
@winny-
winny- / authorized_keys
Last active July 18, 2020 01:25
a wrapper script & config file for borgmatic backups of a gentoo host
command="borg serve --restrict-to-repository /mnt/backup/snowcrash/repository.borg",restrict ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8SWIIOpimeXVMhzaAy20tS3bY5b1IfZwNS/S8yz2pHGPdBtDQtcpXtNWXqNaQD+pIKbJzTDC2KzG2wCYvrOkw08mPb0YhLttHMllyU1AAKXCD4c3CWCe0b3Qerr6YbeJRpHBc1LCtv3hd/DltbgrXC8wJpKywd0C+TYLnJ0uBATx/+VUhQY/mXoLYwsdG1T+9Yw0v8iVnmDn4vGcdfoWnn43TOiVpoAAI0ERa5+PoIYpuWh2ZHJwXlFW05+3toHf4q/IJM6fUbYuCuj0MW7dTzFuIOm/EbWfgyD1SoKbSzdtiCpzwfDVGFsVvkMCJT2qb/+h8bIdVuZrAEJcgA1N7xYkmeL8zOVr7A3HAaJIiBGXmHuiXyl6tpuZ2y8kb4mQ+l9ymQhLaHd+kipGhZYwDySl6r3grg/qk14WPP1orNPPjA/1zzz2bqJxveKN4/1/8KEpZFpF7CarIxeocO3/N0fKwh+StmGeIu8Dt4fu7TYFgP8kZlJLv5GkO2/2OJJ0= root@snowcrash
#!/usr/bin/env python
"""Executes python-readability on current page and opens the summary
as new tab.
Depends on the python-readability package found at
https://github.com/buriy/python-readability .
Based off of
https://github.com/qutebrowser/qutebrowser/blob/master/misc/userscripts/readability
with fixes for various crashes and fixes URLs.
-- This works: ghc -o h h.hs && ./h
--
-- This does not work: ghci h.hs
-- Get the following error: ghc: <stdout>: hFlush: illegal operation (handle is closed)
import System.IO
main = do
putStrLn "hello world"
hClose stdout
;; Via
;; https://github.com/stumpwm/stumpwm/wiki/Tips-And-Tricks
(defun show-key-seq (key seq val)
(message (print-key-seq (reverse seq))))
(add-hook *key-press-hook* 'show-key-seq)
;; Via Ticks and Tricks (above)
(stumpwm:add-hook stumpwm:*destroy-window-hook*
#'(lambda (win) (stumpwm:repack-window-numbers)))
(defcommand toggle-show-keys () ()
[Personal]
source = imaps://winston%40ml1.net:evzc3zktk4x455jx@imap.fastmail.com:993
outgoing = smtp+plain://winston%40ml1.net:evzc3zktk4x455jx@smtp.fastmail.com:587
default = INBOX
smtp-starttls = yes
from = Winston Weinert <winston@ml1.net>
copy-to = Sent
[UWM]
source = imaps://weinertw%40uwm.edu:SeeYaLaterUWM%21@outlook.office365.com
#!/home/winston/venv/ping_servers/bin/python
# pip3 install nbt mcstatus tabulate
"""
Ping servers in the servers.dat
Works on Mac, should work on Windows and Linux.
"""