Skip to content

Instantly share code, notes, and snippets.

View hannesbe's full-sized avatar
🏠
Working from home

Hannes Van de Vel hannesbe

🏠
Working from home
View GitHub Profile
@hannesbe
hannesbe / gmailAutoArchive.js.gs
Created December 28, 2019 00:21
Auto Archive Gmail script
// Original author fwed ([email protected])
// Modified from
// https://gist.github.com/anonymous/2cca33d376f7f924fdaa67891ad098cc
// https://medium.com/@fw3d/auto-archive-emails-in-gmail-after-2-days-1ebf0e076b1c
function gmailAutoArchive() {
gmailAutoarchiveHelper(30);
}
{
"menulanguage": "English",
"name": "zzz55PUS7600/12",
"country": "Belgium",
"serialnumber_encrypted": "LLfxI4h9qmyYM2Uh0nzY18h34e4/dM07hCxEtOYsefg=\n",
"softwareversion_encrypted": "L+93GMOWgt1v09BCJBNdI9gZ0qeZOirAHsayGqoB7/E=\n",
"model_encrypted": "dFuoHbIninStfq5kYJS5ocpqNgrlAtvi4voV8778kiw=\n",
"deviceid_encrypted": "HgAs8D/KmX5LNOMnVUEiUTVqFQWdLCkhvEnrhb8yZ1k=\n",
"nettvversion": "5.2.0",
"epgsource": "ip",
@hannesbe
hannesbe / crontab
Created September 19, 2019 00:24
cron
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
@hannesbe
hannesbe / install-google-drive-ocamlfuse-debian.sh
Last active September 6, 2023 15:01 — forked from OneCDOnly/gist:972755c5c5825ddd819cb2729a52b646
Install 'google-drive-ocamlfuse' on Debian Stretch & Buster
#/bin/bash
# Installs google-drive-ocamlfuse on Debian (Stretch & Buster)
#
# Run this oneliner to make it happen
# bash <(curl -sSL https://gist.github.com/hannesbe/6c110e9de6644f07a48eecfdbe6b728d/raw)
sudo apt install -y software-properties-common dirmngr
sudo cat > /etc/apt/sources.list.d/alessandro-strada-ubuntu-ppa-bionic.list << EOF
deb http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu xenial main
@hannesbe
hannesbe / entity_rename_find_replace.j2
Created August 7, 2019 04:34
Jinja2 template, generating hass-cli commands, to make renaming Z-Wave entities for example a lot easier
{%- set find = "shenzhen_neo_electronics_co_ltd_water_leakage_detector" -%}
{%- set replace = "boiler_water_leak_sensor" -%}
{%- for item in states -%}
{% if find in item.object_id %}
hass-cli entity rename --name "{{ item.object_id.replace(find, replace).replace("_", " ")|title }}" {{ item.entity_id }} {{ item.entity_id.replace(find, replace) }}
{%- endif -%}
{%- endfor -%}
@hannesbe
hannesbe / os-release
Created February 21, 2019 14:25
CentOS 7 os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
@hannesbe
hannesbe / install_vmware_vcli.sh
Last active February 6, 2019 00:52
VMware vCli - install deps + install from tarball (Ubuntu & co)
#!/bin/bash
# VMware vCli - install deps + install from tarball (Ubuntu & co)
## https://www.vmware.com/support/developer/vcli/
## https://my.vmware.com/group/vmware/get-download?downloadGroup=VS-CLI-670
sudo apt-get install -y lib32z1 build-essential gcc uuid uuid-dev perl libssl-dev perl-doc liburi-perl libxml-libxml-perl libcrypt-ssleay-perl
tar -zxvf VMware-vSphere-CLI-6.7.0-8156551.x86_64.tar.gz
cd vmware-vsphere-cli-distrib
sudo ./vmware-install.pl
@hannesbe
hannesbe / install-multidomain-snowplaza.nl-2018.sh
Created January 18, 2019 19:57
Install multidomain-snowplaza.nl-2018
#!/usr/bin/env bash
certname="multidomain-snowplaza.nl-2018"
download="https://c.connexeon.com/s/T4zobDsDz2SQR5F/download"
rm -f $certname.zip
rm -rf $certname/
wget $download
mv download $certname.zip
unzip $certname.zip
cd $certname/
@hannesbe
hannesbe / revert-certificate-multidomain-snowplaza-2018.sh
Last active January 18, 2019 20:22
Revert to multidomain-snowplaza-2018
#!/usr/bin/env bash
certname="snowplaza-multidomain-2018"
cd $certname/
rm -f /etc/nginx/ssl/nginx.crt
rm -r /etc/nginx/ssl/nginx.key
ln -s /etc/ssl/certs/$certname.crt /etc/nginx/ssl/nginx.crt
ln -s /etc/ssl/private/snowplaza-multidomain-2016.private.key /etc/nginx/ssl/nginx.key
@hannesbe
hannesbe / install-certificate-multidomain-www.snowplaza-2019.sh
Last active January 18, 2019 22:49
SSL certificate installation script for Spalder reverse-proxy servers
#!/usr/bin/env bash
certname="multidomain-www.snowplaza.nl-2019"
download="https://c.connexeon.com/s/oArzonTLRJknMLS/download"
apt-get update
apt-get upgrade -y
apt-get install unzip lnav glances -y
rm -f $certname.zip
rm -rf $certname/
wget $download