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 <stdlib.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <errno.h> | |
| #include <linux/input.h> | |
| #include <string.h> | |
| #include <stdio.h> | |
| /* | |
| * Mostly a copy from https://stackoverflow.com/a/20946151 |
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
| version: '2' | |
| services: | |
| proxy: | |
| restart: always | |
| image: jwilder/nginx-proxy:alpine | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| volumes: | |
| - /var/run/docker.sock:/tmp/docker.sock:ro |
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
| const AT_CMD_GNSS_POWER_ON = "AT+CGNSPWR=1" // Turn on GNSS power | |
| const AT_RESP_GNSS_POWER_ON = "+CGNSPWR: 1" // GNSS power is on | |
| const AT_CMD_GNSS_POWER_OFF = "AT+CGNSPWR=0" // Turn off GNSS power | |
| const AT_RESP_GNSS_POWER_OFF = "+CGNSPWR: 0" // GNSS power is off | |
| const AT_CMD_GNSS_ENABLE_NMEA_TO_UART = "AT+CGNSTST=1" // Begin sending NMEA data to AT UART | |
| const AT_RESP_GNSS_ENABLE_NMEA_TO_UART = "+CGNSTST: 1" // NMEA data is set to be sent to UART | |
| const AT_CMD_GNSS_DISABLE_NMEA_TO_UART = "AT+CGNSTST=0" // Halt sending NMEA data to AT UART |
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
| #!/usr/bin/env bash | |
| # | |
| # List Ports - Raspberry Pi 3 B+ USB Port Identifier | |
| # Author: Isaac Parker <parrotmac@gmail.com> | |
| # License: MIT | |
| # | |
| # Script to make identifying physical devices | |
| # plugged into Raspberry Pi USB ports easier | |
| # sys path for USB devices |
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
| red_on() { | |
| echo 255 > /sys/class/leds/pca963x:red/brightness | |
| } | |
| red_off() { | |
| echo 0 > /sys/class/leds/pca963x:red/brightness | |
| } | |
| blue_on() { | |
| echo 255 > /sys/class/leds/pca963x:blue/brightness |
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 ( | |
| "github.com/godbus/dbus" | |
| "go.uber.org/zap" | |
| ) | |
| const hotspotConnectionUUID = "45b366f6-e56c-4b46-8699-e5fb62ce292e" | |
| const ( |
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 React, { Component } from 'react'; | |
| interface IProps { | |
| // TODO | |
| } | |
| class ${NAME} extends Component<IProps> { | |
| public render(): React.ReactNode { | |
| return ( | |
| <div>${NAME}</div> |
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 | |
| # Sends command 'ATI' to modem #3 | |
| # Get a list of modems by running `mmcli -L` | |
| # Timeout is (probably) 2 seconds | |
| # Also see https://www.freedesktop.org/software/ModemManager/api/latest/gdbus-org.freedesktop.ModemManager1.Modem.html#gdbus-method-org-freedesktop-ModemManager1-Modem.Command | |
| dbus-send --system --dest=org.freedesktop.ModemManager1 --print-reply /org/freedesktop/ModemManager1/Modem/3 org.freedesktop.ModemManager1.Modem.Command string:'ATI' uint32:2000 |
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 React, {Component} from 'react' | |
| class ${NAME} extends Component { | |
| render() { | |
| return ( | |
| <div>${NAME}</div> | |
| ) | |
| } | |
| } |
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
| document.cookie.split(";").map(cookie => {var _csrf = cookie.indexOf("csrftoken")===0?cookie.split("=")[1]:0; if(_csrf)return _csrf })[0]; |