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 -e | |
# usage | |
# cd /etc/; fstab2uml | |
grep -v -e '^\s*#' -e '^\s*$' fstab | sed -r 's|(^[^ ]+) *([^ ]*) .*|database "\2" <<\1>>|g' | |
grep -v -e '^\s*#' -e '^\s*$' fstab | grep x-systemd | tr -s ' ' | cut -d ' ' -f 1,2 | xargs -n 1 -I {} bash -c 'grep ^$(echo {}| cut -d " " -f 1) fstab | tr "," "\n" | tr " " "\n" | grep "x-systemd\." | sed -r "s|x-systemd\.(.*)=(.*)|[\2]: \1|" | xargs -n 1 -I [] echo "[$(echo {} | cut -d " " -f 2)] -up-> []"' |
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
# https://github.com/AprilRobotics/apriltag | |
# example image: https://github.com/AprilRobotics/apriltag-imgs/blob/master/tagStandard41h12/mosaic.png | |
import cv2 | |
from apriltag import apriltag | |
cam = cv2.VideoCapture(0) | |
cv2.namedWindow("detections") | |
img_counter = 0 |
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
#include <M5Stack.h> | |
#include <WiFi.h> | |
#include "lwip/apps/sntp.h" | |
#define TFT_GREY 0x5AEB | |
const char *ssid = "ssid"; | |
const char *password = "password"; |
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
#include "BleConnectionStatus.h" | |
BleConnectionStatus::BleConnectionStatus(void) { | |
} | |
void BleConnectionStatus::onConnect(BLEServer* pServer) | |
{ | |
this->connected = true; | |
BLE2902* desc = (BLE2902*)this->inputKeyboard->getDescriptorByUUID(BLEUUID((uint16_t)0x2902)); | |
desc->setNotifications(true); |
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
(require 'package) | |
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) | |
(not (gnutls-available-p)))) | |
(proto (if no-ssl "http" "https"))) | |
(when no-ssl (warn "\ | |
Your version of Emacs does not support SSL connections, | |
which is unsafe because it allows man-in-the-middle attacks. | |
There are two things you can do about this warning: | |
1. Install an Emacs version that does support SSL and be safe. | |
2. Remove this warning from your init file so you won't see it again.")) |
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
#include <GxEPD2_BW.h> | |
#include <Fonts/FreeMonoBold9pt7b.h> | |
#define EPD_CS SS | |
GxEPD2_BW<GxEPD2_213_B73, GxEPD2_213_B73::HEIGHT> display(GxEPD2_213_B73(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEH0213B73 | |
#define BAT 35 |
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
/* | |
VDD ---------- 3.3V | |
SDA ---------- A4 | |
SCL ---------- A5 | |
GND ---------- GND | |
*/ | |
#include "MadgwickAHRS.h" // github.com/arduino-libraries/MadgwickAHRS | |
#include "MPU9250.h" // github.com/bolderflight/MPU9250 |
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
SUBSYSTEM!="tty", GOTO="ublox-m8_rules_end" | |
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a8", SYMLINK+="ublox-m8" MODE="0666" | |
LABEL="ublox-m8_rules_end" |
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
package main | |
import ( | |
"flag" | |
"io" | |
"log" | |
"net" | |
"net/http" | |
"os" | |
"syscall" |
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 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") |
NewerOlder