Skip to content

Instantly share code, notes, and snippets.

View fliphess's full-sized avatar

Flip Hess fliphess

View GitHub Profile
@rsciriano
rsciriano / opentherm.yaml
Last active July 21, 2023 21:31
Code of a device, created with ESPHome, to integrate an OpenTherm boiler with Home Assistant
substitutions:
devicename: opentherm
upper_devicename: Opentherm
esphome:
name: $devicename
platform: ESP8266
board: d1_mini_lite
arduino_version: '2.7.2'
platformio_options:
@oxan
oxan / README.md
Last active October 3, 2021 20:43
Stream server (serial-to-wifi bridge) for ESPHome
@joshstrange
joshstrange / Xiaomi.pm
Created April 28, 2018 14:06
Control script for Xiaomi Dafang
package ZoneMinder::Control::Xiaomi;
use 5.006;
use strict;
use warnings;
require ZoneMinder::Base;
require ZoneMinder::Control;
our @ISA = qw(ZoneMinder::Control);
@filipenf
filipenf / convert-and-test.sh
Last active March 28, 2023 20:39
Script to convert an ansible vault into a yaml file with encrypted strings
#!/bin/bash
#Vault password is 1
echo "Converting vault to yaml format:"
ansible-vault decrypt --output - vault | python ./convert_vault.py > new-vault.yml
echo "Decrypting a variable from the converted vault"
ansible localhost -i localhost, -e @new-vault.yml -m debug -a 'var=secret' --ask-vault-pas
@tdgroot
tdgroot / magerunmaps-generator.py
Last active August 16, 2017 08:37
Generate your http.magerunmaps config file on hypernode based on your storefront configuration
#!/usr/bin/env python
# MIT License
#
# Copyright (c) 2017 Timon de Groot
#
# 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 the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@0x4D31
0x4D31 / beautiful_idiomatic_python.md
Last active April 19, 2024 09:17 — forked from JeffPaine/beautiful_idiomatic_python.md
[Beautiful Idiomatic Python] Transforming Code into Beautiful, Idiomatic Python #python

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@jriguera
jriguera / email_notify.py
Last active February 20, 2023 09:09
Email from Python with Jinja2
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Python 3 and compatibility with Python 2
from __future__ import unicode_literals, print_function
import os
import sys
import re
import logging
@meatballhat
meatballhat / run-travis-docker-image
Created February 23, 2015 15:37
Travis docker image usage
#!/usr/bin/env bash
set -o errexit
set -o xtrace
# Provide the "language" as $TRAVIS_LANGUAGE or first positional argument. Available languages
# at the time of this writing are:
#
# android
# erlang
@stefansundin
stefansundin / git-bundle-hook.md
Last active February 1, 2024 06:42 — forked from 8bitDesigner/1.md
Git post-checkout and post-merge hooks to simplify bundling and other tasks.

Make bundleing and npm installing easy

These git hooks runs bundle or npm install automatically whenever you:

  • git checkout a new branch with a different Gemfile or package.json.
  • git pull a change to Gemfile or package.json.

How to install

  1. cd awesome_git_repo
@peterjaap
peterjaap / magento-testing-scenarios.md
Last active October 17, 2022 10:16
Magento testing scenarios

Magento testing scenarios

For use after an upgrade to verify the correct working of Magento

SHIP IT

Frontend

General

  • Activate all logs on the server (PHP, MySQL, Magento, mail, etc)
  • Check meta tags in HTML