Skip to content

Instantly share code, notes, and snippets.

View derqurps's full-sized avatar

Roman Reitschmied derqurps

View GitHub Profile
@derqurps
derqurps / light_on_off.yaml
Last active November 27, 2023 17:14
Home Assistant Blueprint: Turns a light On/Off on switch sensor event On/Off
blueprint:
name: LightOnOff
description: 'Turns a light On/Off on switch sensor event On/Off'
domain: automation
source_url: https://gist.github.com/derqurps/6bb13cb6d5bae02b03cfa9ebcb296a53
input:
light_target:
name: Light devices
description: The light to control.
selector:
@derqurps
derqurps / redactle-stopwords.user.js
Last active November 17, 2022 17:24
automatically enter your default stopwords on redactle-unlimited.com
// ==UserScript==
// @name redactle stopwords
// @namespace http://tampermonkey.net/
// @version 0.2
// @description automatically enter your default stopwords on redactle-unlimited.com
// @author You
// @match https://redactle-unlimited.com
// @grant none
// ==/UserScript==

Keybase proof

I hereby claim:

  • I am derqurps on github.
  • I am derqurps (https://keybase.io/derqurps) on keybase.
  • I have a public key whose fingerprint is BD64 2D68 7DC7 A23A F2AC EF41 6013 A9F2 02D5 0394

To claim this, I am signing this object:

@derqurps
derqurps / package.json
Created October 17, 2016 17:32
node basic scripts in package.json
{
"scripts": {
"test": "./node_modules/.bin/mocha --reporter spec test/test.js",
"docs": "npm run generate-docs",
"generate-docs": "node_modules/jsdoc/jsdoc.js ./ ./README.md -c docs/conf.json -r && node_modules/apidoc/bin/apidoc -i ./ -o apiDoc/ -e node_modules -e docs -e apiDoc -e test",
"postinstall": "",
"genShrinkwrap": "(rm -rf node_modules || true) && (rm -rf npm-shrinkwrap.json || true) && npm i && npm run generate-docs && (rm -rf npm-shrinkwrap.json || true) && npm prune && npm shrinkwrap",
"watch": "./node_modules/nodemon/bin/nodemon.js server.js"
},
}
@derqurps
derqurps / vacuum_journal_files.sh
Created August 27, 2016 13:00
truncat journal files in fedora
sudo journalctl --vacuum-size=50M
/var/log/xyz.log {
missingok
notifempty
compress
size 20k
daily
}
// test logrotate files (actually rotate them)
logrotate -f /etc/logrotate.conf
git --version
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker
wget https://github.com/git/git/archive/v2.8.0.tar.gz
tar xzf v2.8.0.tar.gz
yum remove git
cd git-2.8.0/
make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc