View zha_moes_smart_knob_lights.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: ZHA - Moes Smart Knob for lights | |
description: | | |
Control lights with a Moes Smart Knob. | |
Rotating left/right will change the brightness smoothly of the selected light. | |
Inspired from https://gist.github.com/seamus65/939a147634942dd885c8704334627f93 | |
domain: automation | |
input: | |
remote: | |
name: Remote |
View ping_email.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
HOSTS_TO_CHECK=( | |
127.0.0.1 | |
github.com | |
test_invalid.com | |
) | |
test_host() { |
View modele_cape.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import yargs from 'yargs' | |
import Engine, { formatValue } from 'publicodes' | |
import rules from 'modele-social' | |
// npm install publicodes modele-social yargs | |
// node ./modele.mjs --salaireBrut 2500 2>/dev/null | jq | |
// Définition des arguments en ligne de commande avec yargs |
View .gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
credentials.yaml |
View record_ram_usage.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ram_usage() { | |
free -m | grep Mem | awk '{print $3}' | |
} | |
base=$(ram_usage) | |
max=0 | |
while true; do |
View import_apps.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import re | |
import json | |
import yaml | |
import psycopg2 | |
def connect_db(): | |
hostname = "localhost" |
View serial_duplicator.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import os | |
import signal | |
import threading | |
import subprocess | |
from typing import Optional | |
from pathlib import Path |
View local_prefix_variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file expects LOCAL_PREFIX to be an absolute path to the prefix (like /usr or $HOME/.local) | |
export PATH="${LOCAL_PREFIX}/bin:${PATH}" | |
# Used to detect the build dependencies | |
export PKG_CONFIG_PATH="${LOCAL_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}" | |
export PKG_CONFIG_PATH="${LOCAL_PREFIX}/lib64/pkgconfig:${PKG_CONFIG_PATH}" | |
export PKG_CONFIG_PATH="${LOCAL_PREFIX}/share/pkgconfig:${PKG_CONFIG_PATH}" | |
export PKG_CONFIG_PATH="${LOCAL_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}" |
View crosstool-config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Automatically generated file; DO NOT EDIT. | |
# crosstool-NG aca85cb Configuration | |
# | |
CT_CONFIGURE_has_static_link=y | |
CT_CONFIGURE_has_wget=y | |
CT_CONFIGURE_has_curl=y | |
CT_CONFIGURE_has_stat_flavor_GNU=y | |
CT_CONFIGURE_has_make_3_81_or_newer=y | |
CT_CONFIGURE_has_libtool_2_4_or_newer=y |
View svg2dxf.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# The assert function for Bash | |
function assert { | |
local rc | |
local message="$1" | |
shift | |
"$@" 2>&1 > /dev/null | |
rc=$? | |
[ $rc -eq 0 ] && return 0 | |
set $(caller) |
NewerOlder