A sort-of style guide and operational handbook for OpenShfit and k8s.
Inspired by the Uber Go Style Guide.
| { | |
| "telemetry.telemetryLevel": "off", | |
| "editor.rulers": [80], | |
| } |
| resource "random_password" "password" { | |
| count = 4 | |
| length = 5 | |
| special = false | |
| } | |
| locals { | |
| password = "${random_password.password[0].result}-${random_password.password[1].result}-${random_password.password[2].result}-${random_password.password[3].result}" | |
| password_hash = bcrypt(local.password) | |
| } |
A sort-of style guide and operational handbook for OpenShfit and k8s.
Inspired by the Uber Go Style Guide.
| function New-OpsgenieAlert { | |
| param ( | |
| [parameter(Mandatory=$true)][string]$ApiKey, | |
| [parameter(Mandatory=$true)][string]$Message, | |
| [parameter(Mandatory=$false)][string]$Alias, | |
| [parameter(Mandatory=$false)][string]$Description, | |
| [parameter(Mandatory=$false)][PSCustomObject[]]$Responders, | |
| [parameter(Mandatory=$false)][PSCustomObject[]]$VisibleTo, | |
| [parameter(Mandatory=$false)][string[]]$Actions, |
| receiver: | |
| - name: OpsgenieTeam | |
| opsgenie_configs: | |
| - api_url: 'https://api.opsgenie.com/' | |
| api_key: '<api-key-here>' | |
| priority: | | |
| {{ if eq .GroupLabels.severity "critical" }}P2{{ else if eq .GroupLabels.severity "warning" }}P3{{ else if eq .GroupLabels.severity "info" }}P4{{ else }}P5{{ end }} |
| { | |
| read # ignore first line | |
| while IFS=, read -r name location address address_ipv6 | |
| do | |
| printf "%-18s %-15s %-20s\n" "acl whitelist src" "$address" "# $name" | |
| done | |
| } < probe-servers.csv # default file name |
| #include <avr/io.h> | |
| #include <util/delay.h> | |
| typedef struct { | |
| bool BIT0 : 1; | |
| bool BIT1 : 1; | |
| bool BIT2 : 1; | |
| bool BIT3 : 1; | |
| bool BIT4 : 1; | |
| bool BIT5 : 1; |
| /** | |
| Copyright (C) 2012-2018 by Autodesk, Inc. | |
| All rights reserved. | |
| FANUC post processor configuration. | |
| $Revision: 41862 7fce30c1baca03654655586a08a94540efb2c6fb $ | |
| $Date: 2018-02-22 13:45:13 $ | |
| FORKID {04622D27-72F0-45d4-85FB-DB346FD1AE22} |
| /** | |
| Copyright (C) 2012-2016 by Autodesk, Inc. | |
| All rights reserved. | |
| TekMOV Router post processor configuration. | |
| $Revision$ | |
| $Date$ | |
| FORKID {21E9AB8B-76BE-4e51-9D5B-CA4A2631FC5F} |
| from microbit import * | |
| def speed_to_output(i): | |
| return abs(i)*255 | |
| def motor(speed, pin_a, pin_b): | |
| pin_a.write_analog(speed_to_output(speed) if speed > 0 else 0) | |
| pin_b.write_analog(speed_to_output(speed) if speed < 0 else 0) | |
| def drive_tank(left, right): |