This file contains hidden or 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
| # frozen_string_literal: true | |
| # Only used during test and development. Ensures we never receive or respond with | |
| # header data that is over 4k. | |
| # See: https://community.convox.com/t/getting-502-bad-gateway-errors-for-one-page-on-v3-rack-app-responds-with-200-and-the-page-works-fine-on-v2-rack/841 | |
| module Rack | |
| class HeaderLengthEnforcer | |
| class HeadersTooLargeError < StandardError; end | |
| NGINX_HEADER_LENGTH_LIMIT = 4000 |
This file contains hidden or 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
| [Unit] | |
| Description=Compile Jinja templates to YAML in Home Assistant config directory | |
| After=network.target | |
| StartLimitIntervalSec=0 | |
| [Service] | |
| Type=simple | |
| Restart=always | |
| RestartSec=3 | |
| ExecStart=/opt/ha_compile_jinja.sh |
This file contains hidden or 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
| { | |
| "title": "Double tap keypad_enter to double tap fn (start dictation.) Single tap for keypad_enter after a short delay (250ms.)", | |
| "rules": [ | |
| { | |
| "description": "This rule solves a problem with the Microsoft Surface Ergonomic Keyboard. The `Fn` key can't be used to start dictation, since it only toggles an internal state on and off, and it does not actually send any keypress event. This rule allows you to start dictation by double tapping the keypad enter key, which will send Fn twice. If you only press the keypad enter key once, it will send the original enter key after a short delay (250ms).", | |
| "manipulators": [ | |
| { | |
| "conditions": [ | |
| { | |
| "name": "keypad_enter pressed", |
This file contains hidden or 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
| esphome: | |
| name: rangehood | |
| includes: | |
| - rangehood_button_leds.h | |
| esp32: | |
| board: nodemcu-32s | |
| framework: | |
| type: arduino |
This file contains hidden or 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 | |
| set -eo pipefail | |
| CURRENT_DIR="$(realpath $(dirname "$0"))" | |
| ROOT_DIR="$(realpath $CURRENT_DIR/..)" | |
| # https://gitlab.com/docspring/docspring | |
| PROJECT_ID="1908805" | |
| GITLAB_TOKEN=$(cat $ROOT_DIR/.gitlab-api-token) |
This file contains hidden or 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
| Hint: This person is an actor. | |
| ____ ____ | |
| => e | |
| There were no e's! | |
| - Guesses: e | |
| ____ ____ | |
| => t | |
| There were 2 t's! |
This file contains hidden or 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
| // Used for loop that waits for pending jobs to be processed. | |
| LoopList={"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", | |
| "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", | |
| "21", "22", "23", "24", "25", "26", "27", "28", "29", "30"}; | |
| templateID = "<TEMPLATE ID>"; | |
| apiTokenId = "<API TOKEN ID>"; | |
| apiTokenSecret = "<API TOKEN SECRET>"; | |
| base64EncodedLogin = zoho.encryption.base64Encode(apiTokenId + ":" + apiTokenSecret); |
This file contains hidden or 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 | |
| set -eo pipefail | |
| CURRENT_DIR="$(realpath $(dirname "$0"))" | |
| ROOT_DIR="$(realpath $CURRENT_DIR/..)" | |
| # https://gitlab.com/docspring/docspring | |
| PROJECT_ID="1908805" | |
| GITLAB_TOKEN=$(cat $ROOT_DIR/.gitlab-api-token) |
This file contains hidden or 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
| # VS Code freezes for 1-2 seconds with regex search "([^]+\n)+" | |
| # foo foo foo foo | |
| foo(foo).foo foo 'foo' | |
| foo(foo).foo foo 'foo' | |
| foo(foo( | |
| 'foo.foo.foo-foo-foo .foo-foo-foo' | |
| ).foo).foo foo('foo foo') | |
| foo(foo).foo foo 'foo foo' |
This file contains hidden or 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
| namespace :system do | |
| desc 'Check for security updates for Debian packages' | |
| task check_security_updates: :environment do | |
| return unless Rails.env.production? | |
| Cronitor.run(ENV['CRONITOR_ID_CHECK_SECURITY_UPDATES']) do | |
| stdout, stderr, status = Open3.capture3('apt-get update') | |
| unless status.success? | |
| raise "'apt-get update' failed! stdout:\n#{stdout}\nstderr:\n#{stderr}" |