Skip to content

Instantly share code, notes, and snippets.

View centic9's full-sized avatar

Dominik Stadler centic9

View GitHub Profile
@sephiroth74
sephiroth74 / git pretty stat
Last active April 17, 2024 22:23
Show lines added/deleted and total commits per author in a period of time on all branches
git log --all --numstat --pretty="%H" --author="author" --since=1.year | awk 'NF==3 {plus+=$1; minus+=$2} NF==1 {total++} END {printf("lines added: +%d\nlines deleted: -%d\ntotal commits: %d\n", plus, minus, total)}'
@bittner
bittner / 60-jetbrains.conf
Created September 25, 2015 07:57
Inotify configuration for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). Create this file with e.g. `sudo vim /etc/sysctl.d/60-jetbrains.conf`
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm).
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and
# run `sudo service procps start` or reboot.
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
#
# More information resources:
# -$ man inotify # manpage
# -$ man sysctl.conf # manpage
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use
@bignall
bignall / dont-lose-konsole-terminal-sessions-on-reboot.md
Last active July 12, 2023 12:22 — forked from bguiz/dont-lose-gnome-terminal-sessions-on-reboot.md
Ensures that you don't lose your konsole sessions when you crash/ reboot Linux

Usage

  • Save the two files below. I put them in '~/.scripts'
  • Modify the configuration in konsole-watcher.sh to your liking
  • Modify the location of konsole-watcher.sh in konsole-watcher-autostart.sh if you chose to put it somewhere besides ~/.scripts
  • Create the directory ~/.konsole (or other location you chose for the save file)
  • Create a symlink to konsole-watcher-autostart.sh in '~/.config/autostart-scripts
  • or open System Settings > Startup and Shutdown and add a script to the Script Files (it does the same thing as creating the symlink)
  • You might want to add a menu entry as well in case KDE autostart doesn't work for some reason
@aetheryx
aetheryx / index.js
Last active May 2, 2020 14:24
arctis-7-tasmota; a small application to map the ChatMix slider on the SteelSeries Arctis 7 to a smart bulb running Tasmota (https://youtu.be/X5MLXNftdC4)
const HID = require('node-hid');
const mqtt = require('mqtt');
const config = {
/**
* The amount of times (per second) your headset gets polled.
* Higher = smoother, but more battery-hungry.
* In my experience setting this higher than 100 will cause your headset, Windows, or both to shit themselves.
*/
pollingRate: 10,