Skip to content

Instantly share code, notes, and snippets.

View leviathan747's full-sized avatar

Levi Starrett leviathan747

View GitHub Profile
@leviathan747
leviathan747 / gcp.py
Last active October 21, 2021 09:54
Python script for submitting Google Cloud Print jobs from macOS native print dialog using PDF Services.
#!/usr/local/bin/python3
# This script can be used to submit Google Cloud Print jobs from the PDF services menu in macOS
#
# Prerequisites:
# - Python 3.x
# - oauth2client installed
#
# Setup instructions:
# 1. Clone this gist into a directory called ".gcp" in your home directory. Assure
@leviathan747
leviathan747 / watchbuild
Last active April 2, 2019 13:45
Ping a host every ten seconds and notify when it becomes unreachable
#!/bin/bash
if [[ $# != 2 ]]; then
echo "Usage:"
echo "watchbuild <host> <delay>"
exit 1
fi
sleep $2
while true; do
ping -c 1 $1 &> /dev/null
if [[ 0 != $? ]]; then
@leviathan747
leviathan747 / imu_brick_node.cpp
Created May 29, 2019 19:37 — forked from matlabbe/imu_brick_node.cpp
IMU v2 brick ROS node
#include <ros/ros.h>
#include <sensor_msgs/Imu.h>
#include <string.h>
#include "tinkerforge/ip_connection.h"
#include "tinkerforge/brick_imu_v2.h"
#define HOST "localhost"
@leviathan747
leviathan747 / ubuntu-vnc-ros-desktop.dockerfile
Created May 31, 2019 18:35
Dockerfile for building an image based on https://github.com/fcwu/docker-ubuntu-vnc-desktop with ROS desktop installed.
FROM dorowu/ubuntu-desktop-lxde-vnc
# install packages
RUN apt-get update && apt-get install -q -y \
dirmngr \
gnupg2 \
lsb-release \
&& rm -rf /var/lib/apt/lists/*
# setup keys