Skip to content

Instantly share code, notes, and snippets.

View jpoles1's full-sized avatar

Jordan Poles jpoles1

View GitHub Profile
@jpoles1
jpoles1 / cool-rust-libs.md
Last active March 5, 2023 16:57
A WIP listing of my favorite rust libraries

Parallelization

  • Rayon: Easy iterator parallelization

UI

  • Inquire: provides a variety of CLI interfaces including: Auto-complete text entry, multiline text editor, selector and more

Util

  • Bacon: Auto-refreshing CLI rust analyzer, great if you're not using an IDE.
  • Chrono: Human datetime
@jpoles1
jpoles1 / picam.py
Last active January 14, 2021 19:35 — forked from kcranley1/workshop.py
A GUI program for use with the Raspberry Pi Camera
from Tkinter import *
import time
import picamera
import numpy as np
import io
from datetime import datetime, timedelta
camera = picamera.PiCamera()
ON = True
@jpoles1
jpoles1 / okc_filter.js
Created June 5, 2020 19:28
Enter this into your JS console in your web browser on the OKCupid website in order to filter matches based on locale/match percentage.
document.querySelectorAll(".usercard").forEach((cardElem) => {
let pctElem = cardElem.querySelector(".match-percentage");
let localeElem = cardElem.querySelector(".userInfo-meta-location");
//Remove matches < 85% compatibility
if(parseInt(pctElem.innerHTML.replace("%", "")) < 85) {
cardElem.style.display = "none";
}
//Filter on locale
else if(!localeElem.innerHTML.includes(", NY")) {
cardElem.style.display = "none";
@jpoles1
jpoles1 / masksearch.ipynb
Last active March 22, 2020 18:00
MaskSearch
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jpoles1
jpoles1 / genicons.sh
Created October 27, 2019 02:15
Bash script for quickly generating a set of icons for a web app manifest.json as well as a favicon (using imagemagick)
#!/bin/bash
# Requires imagemagick be installed (sudo apt install imagemagick on ubuntu)
convert public/img/icon.png -resize 512x512 public/img/icons/android-chrome-512x512.png
convert public/img/icon.png -resize 192x192 public/img/icons/android-chrome-192x192.png
convert public/img/icon.png -resize 16x16 public/img/icons/16.png
convert public/img/icon.png -resize 32x32 public/img/icons/32.png
convert public/img/icon.png -resize 48x48 public/img/icons/48.png