Skip to content

Instantly share code, notes, and snippets.

View logston's full-sized avatar
🥑
Hmm, I wonder...

Paul Logston logston

🥑
Hmm, I wonder...
View GitHub Profile
### Read from VK-162 USB GPS Dongle
# ie. https://www.amazon.com/VK-162-G-Mouse-External-Navigation-Raspberry/dp/B01EROIUEW
# https://www.gpsworld.com/what-exactly-is-gps-nmea-data/
# https://gist.github.com/logston/67e8d1dff12fe194e04812753a871a4f
#
# Example data:
# $GPTXT,01,01,02,u-blox ag - www.u-blox.com*50
# $GPTXT,01,01,02,HW UBX-G70xx 00070000 FF7FFFFFo*69
# $GPTXT,01,01,02,ROM CORE 1.00 (59842) Jun 27 2012 17:43:52*59
# $GPTXT,01,01,02,PROTVER 14.00*1E
@logston
logston / read-gps.py
Created September 8, 2024 23:37
Read GPS from VK-162 USB GPS Dongle
### Read from VK-162 USB GPS Dongle
# ie. https://www.amazon.com/VK-162-G-Mouse-External-Navigation-Raspberry/dp/B01EROIUEW
# https://www.gpsworld.com/what-exactly-is-gps-nmea-data/
# https://gist.github.com/logston/67e8d1dff12fe194e04812753a871a4f
#
# Example data:
# $GPTXT,01,01,02,u-blox ag - www.u-blox.com*50
# $GPTXT,01,01,02,HW UBX-G70xx 00070000 FF7FFFFFo*69
# $GPTXT,01,01,02,ROM CORE 1.00 (59842) Jun 27 2012 17:43:52*59
# $GPTXT,01,01,02,PROTVER 14.00*1E

Warm Ups

How can we look around the data?

  • \l
  • \dt
  • \d

What does the users table look like?

@logston
logston / custom_build.sh
Last active January 10, 2024 04:53
Build script for Render.com
#!/usr/bin/env bash
# Exit on error.
set -o errexit
# Install reqs as usual.
pip install -r requirements.txt
# Run migrations if needed.
python manage.py migrate
@logston
logston / fill-form.py
Created October 18, 2023 18:40
Fill a Form
import sys
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
def main(url):
driver = webdriver.Firefox()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/**
* An example of docs using multiline comments.
**/
public class MultilineDocs {
/**
* A simple method.
*
* @param arg1 An arg.
**/
public void aMethod(int arg1) {} // end aMethod()
#!/bin/bash
echo 'PATH=${PATH}:/usr/sbin' >> ~/.profile
source ~/.profile
sudo apt update && sudo apt-get install -y tcpdump nmap dnsutils tmux
"""
Back up at https://gist.github.com/logston/088bf6e2435fe8ecac41ab18a93a012a
"""
import base64
import csv
import getpass
import smtplib
import time
import random
from email.mime.multipart import MIMEMultipart
@logston
logston / docker-compose.yml
Created July 28, 2020 14:05
Docker Compose File For Cockroach Labs (CRL)
version: '3.2'
services:
cdb_node_1:
container_name: cdb_node_1
image: cockroachdb/cockroach:v20.1.3
volumes:
- cdb_node_1:/cockroach/cockroach-data
command: start --insecure --join=cdb_node_1,cdb_node_2,cdb_node_3 --advertise-addr=cdb_node_1
ports: