Skip to content

Instantly share code, notes, and snippets.

@Anachron
Anachron / turn-off-dpms.lua
Created March 6, 2023 13:35 — forked from nilninull/turn-off-dpms.lua
A mpv script for turn off dpms while playing video automatically
-- save this file to $XDG_CONFIG_HOME/mpv/scripts/
local dpms_mod = nil
-- local function dpms_mod_start(event)
-- print("RUN dpms mod start", dpms_mod)
-- if dpms_mod == nil then
-- -- This code was checked on xset 1.2.3
-- if os.execute("[ `xset q | sed -n '/^DPMS/,${/^ DPMS/s/^ DPMS is //p}'` == Enabled ]") == 0 then
-- dpms_mod = true
@Anachron
Anachron / sst
Created August 8, 2022 10:07 — forked from mortie/sst
sst: Reliable SSH connections using tmux
#!/bin/sh
# SST: SSH, but reliable, using tmux.
# When you lose connection, the connection will be re-tried, and you will get back where you
# left off.
# An aggressive heartbeat setting is used to detect network issues much more reliably than
# SSH's default settings would.
#
# Usage:
# sst <host>: Create a temporary tmux session, which will be killed when it hasn't
@Anachron
Anachron / githubpull.md
Created August 31, 2020 09:03 — forked from Jabarabo/githubpull.md
Gist of a stolen gist
@Anachron
Anachron / Windows 10 Optimization Script.ps1
Created August 31, 2020 05:39
Windows 10 Optimization Script
##########
# Win10 Optimization Script With Extra GPD Win Tweaks
# Adapted version of https://github.com/Disassembler0/Win10-Initial-Setup-Script by Disassembler <disassembler@dasm.cz>
# Author: BlackDragonBE
# Version: v2.2.1 (2017-12-02)
# Copied from https://www.reddit.com/r/gpdwin/comments/6ipa6c/windows_10_optimization_script_for_gpd_win/
##########
# As a workaround for disabled script execution, run this command (without #) in an elevated PowerShell windows first and choose "all" if you're asked where to apply this:
# Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
@Anachron
Anachron / files.txt
Created April 12, 2020 13:18
panthen-agent-polkit files
[12.04.2020-15:17:53] (pantheon-agent-polkit) files:start
/etc/xdg/autostart/io.elementary.desktop.agent-polkit.desktop
/usr/libexec/policykit-1-pantheon/io.elementary.desktop.agent-polkit
/usr/share/applications/io.elementary.desktop.agent-polkit.desktop
/usr/share/locale/aa/LC_MESSAGES/io.elementary.desktop.agent-polkit.mo
/usr/share/locale/ab/LC_MESSAGES/io.elementary.desktop.agent-polkit.mo
/usr/share/locale/ae/LC_MESSAGES/io.elementary.desktop.agent-polkit.mo
/usr/share/locale/af/LC_MESSAGES/io.elementary.desktop.agent-polkit.mo
/usr/share/locale/ak/LC_MESSAGES/io.elementary.desktop.agent-polkit.mo
/usr/share/locale/am/LC_MESSAGES/io.elementary.desktop.agent-polkit.mo
@Anachron
Anachron / lib_modules_4.19.77_1_build_make.log
Last active October 7, 2019 16:22
Wireguard dkms errors
make: *** -j4: File or directory not found. Exiting.
@Anachron
Anachron / samba.log
Created July 12, 2019 08:11
Samba cross compile issue
# project samba configured on Fri Jul 12 10:02:56 2019 by
# waf 1.5.19 (abi 7, python 20710f0 on linux2)
# using buildtools/bin/waf configure --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc/samba --with-configdir=/etc/samba --localstatedir=/var --enable-fhs --with-lockdir=/var/cache/samba --with-piddir=/var/run/samba --with-logfilebase=/var/log/samba --with-pam --without-systemd --with-ads --with-shared-modules=idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2,pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4,auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4 --enable-cups --bundled-libraries=!asn1_compile,!compile_et --cross-compile --hostcc=cc --cross-answers=answers.txt
#
----------------------------------------
Checking for program gcc or cc
find program=['gcc', 'cc'] paths=[] var='CC'
-> 'aarch64-linux-gnu-gcc'
@Anachron
Anachron / shell.sh
Created June 25, 2019 09:01
xbps remove not-installed package asks users to continue
[anon@lap] ~ » sudo xbps-remove -R dotnet-core
Package `dotnet-core' is not currently installed.
Name Action Version New version Download size
Space available on disk: 4533MB
Do you want to continue? [Y/n] n
@Anachron
Anachron / wg_install.sh
Created June 24, 2019 07:15 — forked from sethenoka/wg_install.sh
A script to spin up a Wireguard VPN server with Unbound recursive DNS in a hurry
#!/bin/bash
# This file is designed to spin up a Wireguard VPN quickly and easily,
# including configuring a recursive local DNS server using Unbound
#
# Make sure to change the public/private keys before running the script
# Also change the IPs, IP ranges, and listening port if desired
# iptables-persistent currently requires user input
# add wireguard repo
sudo add-apt-repository ppa:wireguard/wireguard -y
@Anachron
Anachron / error.log
Created April 18, 2019 16:32
Patch error
The text leading up to this was:
--------------------------
|commit ce14cfda34175b6456a8cc7d1e336dce2b0b0682
|Author: Mihai Moldovan <ionic@ionic.de>
|Date: Thu Jul 5 08:52:18 2018 +0200
|
| src/printwidget.cpp: add QButtonGroup include, fixes compile errors with Qt
|
|diff --git a/src/printwidget.cpp b/src/printwidget.cpp
|index 58a8af7..131d340 100644