Skip to content

Instantly share code, notes, and snippets.

@egradman
egradman / copy_rich_text
Created January 31, 2023 00:51
Copies the current document to the Mac clipboard. It preserves formatting, because it uses pandoc/HTML as an intermediate step.I use https://github.com/Taitava/obsidian-shellcommands
#!/usr/bin/env python3
import sys
import re
import os
import tempfile
import shutil
import uuid
from subprocess import Popen, PIPE, STDOUT
@egradman
egradman / gist:1d42a5a826fa6339fa1ab7af27b3309d
Created August 17, 2021 00:08
generate LAUSD daily_pass
# create a file named .env containing:
#username=<username>
#password=<password>
#student_id=<student_id>
#facility_id=<facility_id>
#find the facility id by inspecting the page once you've selected your school
from selenium import webdriver
from selenium.webdriver.common.by import By
@egradman
egradman / # gazebo9 - 2020-09-14_21-57-47.txt
Created September 15, 2020 05:20
gazebo9 (osrf/simulation/gazebo9) on macOS 10.14.6 - Homebrew build logs
Homebrew build logs for osrf/simulation/gazebo9 on macOS 10.14.6
Build date: 2020-09-14 21:57:47
@egradman
egradman / # gazebo9 - 2020-09-12_22-50-48.txt
Created September 13, 2020 06:15
gazebo9 (osrf/simulation/gazebo9) on macOS 10.14.6 - Homebrew build logs
Homebrew build logs for osrf/simulation/gazebo9 on macOS 10.14.6
Build date: 2020-09-12 22:50:48
"""
quick and dirty rhino script to "hole-out" an inner convex angle so an end-mill can carve it
see:
http://www.kontraptionist.com/post/45218053861/slotted-construction-its-a-pretty-nice-thing-to
for the technique it implements
to use it:
- choose a cplane orthogonal to the face
- run the script
- select the object
#!/bin/bash
the_dir=$1
the_proj=$the_dir/*.xcodeproj
mkdir -p bin
rsync -avz $the_dir/bin/data/ bin/data
cp $the_dir/run.command . || :
xcodebuild -project $the_proj CONFIGURATION_BUILD_DIR=`pwd`/bin && sshpass -p 2bc rsync -avz --exclude=bin/data/ofxRemoteUISettings.xml ./ $2
class Debouncer {
public:
int debounce_delay;
long high_edge_interval;
long last_transition_at;
bool last_val;
bool last_state;
bool state;
@egradman
egradman / sample.ipynb
Last active November 2, 2022 04:59
Simple Google Spreadsheets to Pandas DataFrame in IPython Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Dear Everybody

An Open Letter to Everybody

Dear Everybody with whom I've ever communicated by email on the Internet. I am an asshole. Though you probably received an email purportedly from me exhorting you to check out my profile on LinkedIn, I did not send it. When I have received similar letters in the past, I've deleted them, and scoffed at the sender.

Please do NOT check out my profile on LinkedIn. I don't want you to see it. In fact, by the time you read this it will probably be gone.

Phones in pockets can do all sorts of funny things. I've pocket dialed people before. Everybody has. But I've never pocket emailed thousands of people before. That could only happen with an app written by a company with a complete lack of responsibility when it comes to personal data.

@egradman
egradman / cross-compile raspberry pi openframeworks
Created February 20, 2014 21:18
Cross-compiling OpenFrameworks 0.8 for Raspbian
# cross-compile raspberry pi openframeworks
Tested for my setup:
- Ubuntu 12.04 32-bit
- 2014-01-07-wheezy-raspbian
- OpenFrameworks 0.8 (release)
- My Pi is NFS booting from the Ubuntu box, FWIW.
Follow the directions here: