Skip to content

Instantly share code, notes, and snippets.

View ernierasta's full-sized avatar

Leszek Cimała ernierasta

  • zori.[cz|pl|sk]
  • Czech Republic
View GitHub Profile
@ernierasta
ernierasta / sway-record
Last active August 18, 2022 19:36
Swaywm screen and audio recording
#!/bin/bash
# Sway WM screen + audio recorder
# original author: Aaron D. Fields
# blog post: https://blog.spirotot.com/2017/08/21/a-dirty-hack-to-enable-acceptable-sway-wm-screen-recording/
# currently error 503 :-(
#
# Updated version: ernierasta
# Repo: https://gist.github.com/ernierasta
#
# Changelog:
@KatelynHaworth
KatelynHaworth / main.go
Last active August 12, 2023 20:38
Example of run an interactive process on the current user from system service on windows (Golang)
package main
import (
"github.com/kardianos/service"
"log"
"flag"
)
type Service struct {}
@89luca89
89luca89 / install_powersave.sh
Last active January 21, 2023 20:11
Powersave Rules for Linux | Run and reboot. Consider using the commented tweaks in grub for advanced powersaving
#UDEV rules to handle powersaving
# pcie_aspm=force IN GRUB
echo '
# Some logging
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/bin/sh -c '"'"'echo Unplugged $(date) >> /var/log/powerlog.log'"'"'"
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/bin/sh -c '"'"'echo Plugged $(date) >> /var/log/powerlog.log'"'"'"
# CPU Bias power/performance toggle
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/usr/bin/x86_energy_perf_policy power"
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/usr/bin/x86_energy_perf_policy performance"
# Periferals power saving features
@timhughes
timhughes / ci.sh
Last active November 14, 2016 06:22
Bash continuous integration for Golang on Linux
#! /bin/sh
#
# ci.sh
# Copyright (C) 2014 Tim Hughes <thughes@thegoldfish.org>
#
# Distributed under terms of the MIT license.
#
while true
do