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
@AntumDeluge
AntumDeluge / genpreviews.py
Created August 12, 2021 18:12
Python script for creating Minetest skin preview images
#!/usr/bin/env python
# License header:
#
# The MIT License (MIT)
#
# Copyright (c) 2021 Jordan Irwin (AntumDeluge)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
@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 9, 2024 02:08
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 September 25, 2024 07:18
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 <[email protected]>
#
# Distributed under terms of the MIT license.
#
while true
do