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 | |
set -eo pipefail | |
CURRENT_DIR="$(realpath "$(dirname "$0")")" | |
ROOT_DIR="$(realpath "$CURRENT_DIR"/..)" | |
DEBUG="" | |
debug() { | |
if [ "$DEBUG" != "true" ]; then return; fi | |
echo "[DEBUG] $(date -u +"%Y-%m-%d %H:%M:%S") $*" >&2 | |
} |
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
// ==UserScript== | |
// @name Make CircleCI links clickable | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Scan CircleCI step output for URLs and turn them into links | |
// @author You | |
// @match https://app.circleci.com/pipelines/github/*/*/*/workflows/*/jobs/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=circleci.com | |
// @grant none | |
// @require https://code.jquery.com/jquery-3.6.0.min.js |
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 | |
set -eo pipefail | |
CURRENT_DIR="$(realpath $(dirname "$0"))" | |
ROOT_DIR="$(realpath $CURRENT_DIR/..)" | |
# https://gitlab.com/*********/********** | |
PROJECT_ID="**********" | |
if ! [ -f "$ROOT_DIR/.gitlab-api-token" ]; then | |
echo "Please create a file named .gitlab-api-token in $ROOT_DIR, containing your GitLab API token" >&2 |
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
Copyright 2022 Nathan Broadbent. All rights reserved. | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this PDF document, 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 copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE PDF AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR I |
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
# Inspired by https://medium.com/@coorasse/catch-javascript-errors-in-your-system-tests-89c2fe6773b1 | |
IGNORED_BROWSER_LOGS = [ | |
'You may test your Stripe.js integration over HTTP. However, live Stripe.js integrations must use HTTPS.', | |
].freeze | |
RSpec.configure do |config| | |
config.after :each, js: true do | |
errors = page.driver.browser.manage.logs.get(:browser) | |
next if errors.blank? |
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
# 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 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 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 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 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) |
NewerOlder