Skip to content

Instantly share code, notes, and snippets.

View entropie's full-sized avatar

Michael Trommer entropie

View GitHub Profile
@entropie
entropie / xmonad.hs
Created August 26, 2024 15:45
xmonad.hs 2024, a decade old
{-# OPTIONS_GHC -Wno-deprecations #-}
import XMonad
import System.IO
import XMonad.Actions.CycleWS
import XMonad.Actions.FloatKeys
import XMonad.Actions.SpawnOn
import XMonad.Config.Gnome
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
@entropie
entropie / input_settings.config
Created March 10, 2024 02:27
helldivers 2 input config ( C:\Program Files (x86)\Steam\userdata\STEAMID\553850\remote to bind running and stratagem on mouse 5
// This file is the input config save. It is applied on top of the default values, so
// to reset to defaults simply delete the file. There are two main sections,
// The `settings` part, containing key-value pairs for the settings you can adjust,
// and the mappings groups, which map to the in-game menues for the input groups & bindings.
// The available settings values are (and defaults):
// {
// Number of frames over which to smooth mouse input (zero means no smoothing). Note that this applies to the _movement_, not the position!
// mouse_smoothing_frames = 3
//
// If set (per axis) the look axis is inverted _when aiming down sights_ for gamepads.
#!/usr/bin/env ruby
# this scripts acts as a wrapper for a little daemon that reads a fifo;
#
# If called without allready running it starts a background daemon and
# downloads the argument, then proceeds to watch the fifo for more.
#
# We esnure that the script is only running once and only one dl at a time.
FIFO = "/home/ha/.ytfifo"
@entropie
entropie / 404grep.rb
Last active January 24, 2022 17:34
quickNdirty: get a list of all urls with statuscode 404 from apache-format logfiles with the number of occurrence
#!/usr/bin/ruby
# ruby 404grep.rb /path/to/apache/logfile
require "pp"
LOGFILE = ARGV.join
resH = Hash.new{ |h,k| h[k] = 0 }
@entropie
entropie / panel-redirect.js
Created March 14, 2021 16:20 — forked from balloob/panel-redirect.js
Add redirects to the Home Assistant sidebar to any place in Home Assistant
/*
Add a link to the sidebar to any path in Home Assistant
Put this file in <config>/www/panel-redirect.js
In configuration.yaml:
panel_custom:
- name: panel-redirect
# url_path needs to be unique for each panel_custom config
@entropie
entropie / ahk.lua
Last active January 12, 2021 20:52
#m::
Input, char, L1 T0.5 ;wait for 1 character, for 0.5 seconds and stores it in char
if (ErrorLevel = "TimeOut") ;time limit exceeded
return
if (char = "n")
Send, {Media_Next}
else if (char = "q") {
;Run C:\Program Files\nircmd.exe mutesysvolume 2 "2- USB Audio CODEC"
Run C:\Program Files\SoundVolumeView.exe /Switch "mmic"
path: cabinet
icon: 'mdi:flower-tulip'
panel: false
header:
type: picture
image: 'https://www.home-assistant.io/images/lovelace/header-footer/balloons-header.png'
cards:
- type: grid
square: false
output:
- platform: ledc
pin: GPIO19
frequency: 5000 Hz
id: ventilation_fan_pwm
fan:
- platform: speed
output: ventilation_fan_pwm
name: "RUCK PWM Controller"
^m::
Input, char, L1 T0.5 ;wait for 1 character, for 0.5 seconds and stores it in char
if (ErrorLevel = "TimeOut") ;time limit exceeded
return
if (char = "n")
Send, {Media_Next}
else if (char = "p")
Send, {Media_Prev}
else if (char = " ")
Send, {Media_Play_Pause}
#!/bin/sh
(echo $(dumpkeys |grep -i keymaps); echo keycode 58 = Control) | loadkeys -