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
| import time | |
| import pigpio | |
| motor_pin = 18 # GPIO18 (pin12) | |
| pi = pigpio.pi() | |
| pi.set_mode(motor_pin, pigpio.OUTPUT) | |
| pi.set_servo_pulsewidth(motor_pin, 1300) | |
| print("please power on ESC") |
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
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "os" | |
| "os/signal" | |
| "syscall" |
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
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "os" |
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
| #include <avr/sleep.h> | |
| const int timerOutPin = 11; | |
| #define analogOutMax 235 | |
| void timer() { | |
| unsigned long startTime = millis(); | |
| long elapsedTime = 0; | |
| int outputValue = 0; |
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
| package hoge | |
| import ( | |
| "bytes" | |
| "context" | |
| "encoding/json" | |
| "fmt" | |
| "io/ioutil" | |
| "net/http" | |
| "os" |
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
| #cloud-config | |
| #see: https://cloud.google.com/container-optimized-os/docs/how-to/create-configure-instance | |
| write_files: | |
| - path: /etc/systemd/system/influxdb.service | |
| permissions: 0644 | |
| owner: root | |
| content: | | |
| [Unit] | |
| Description=Start influxdb docker container |
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/sh | |
| set -e | |
| VERSION=$(curl -s https://api.github.com/repos/jenkins-x/jx/releases/latest | jq '.tag_name' -r) | |
| curl -sL https://github.com/jenkins-x/jx/releases/download/$VERSION/jx-linux-amd64.tar.gz | tar xzv | |
| sudo mv jx /usr/local/bin |
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
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "github.com/google/gousb" | |
| "github.com/google/gousb/usbid" | |
| ) |
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
| package calc | |
| import ( | |
| "go/token" | |
| "go/types" | |
| ) | |
| func Compute(expr string) (string, error) { | |
| tv, err := types.Eval(token.NewFileSet(), types.NewPackage("main", "main"), token.NoPos, expr) | |
| if err != nil { |