Skip to content

Instantly share code, notes, and snippets.

View beardicus's full-sized avatar
🐐
goats are cool

Brian Boucheron beardicus

🐐
goats are cool
View GitHub Profile
@eeropic
eeropic / paste-svg-from-clipboard-paper.js
Last active April 25, 2024 06:58
Paste SVG to Paper.js from clipboard
//CC2018
document.addEventListener('paste', function(evt) {
//Import SVG copied to clipboard from Illustrator
//remove last hidden character that will otherwise break the import
if(document.activeElement.nodeName!="TEXTAREA"){
var str=evt.clipboardData.getData('text/plain').slice(0, -1);
var svg=project.importSVG(str)
svg.clipped=false;
svg.children[0].remove()
svg.parent.insertChildren(svg.index,svg.removeChildren());
const sketcher = require('canvas-sketch-tool'); // not yet public
const seedRandom = require('seed-random');
const settings = {
// Output resolution, we use a high value for print artwork
pixelsPerInch: 300,
// US Letter size 8.5x11 inches
dimensions: [ 8.5, 11 ],
// all our dimensions and rendering units will use inches
units: 'in'
@tlrobinson
tlrobinson / geiger.ino
Last active September 12, 2019 20:11
MightyOhm Geiger Counter Kit + ESP8266 (WEMOS D1 mini) https://mightyohm.com/blog/products/geiger-counter/
// get config.h from Adafruit IO example sketch and fill in your details
#include "config.h"
#include <Pins_Arduino.h>
#include <SoftwareSerial.h>
#include <Regexp.h>
AdafruitIO_Feed *cpm_feed = io.feed("Geiger CPM");
AdafruitIO_Feed *cps_feed = io.feed("Geiger CPS");
AdafruitIO_Feed *usv_feed = io.feed("Geiger uSv/hr");
@rkkoszewski
rkkoszewski / gist:aa531cee7126edf329b76bdd0546f502
Last active March 1, 2024 21:31
Notes for installing XorgXrdp and Xrdp with GLAMOR support
THIS ARE MY NOTES OF BUILDING AN INSTALLING XORGXRDP AND XRDP WITH GPU ACCELERATION
TESTED ON DEBIAN 9.13
-- Build XorgXrdp with GPU acceleration ("script" - to be adjusted to your needs) : --
## << BUILD AND INSTALL SCRIPT START >> ##
#!/bin/bash
# Install Latest XRDP with XORGXRDP
# README
@sbyx
sbyx / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active May 14, 2024 17:12
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').
@ehoppmann
ehoppmann / gist:0b10bcaa1e793f757d1caddbd7ec2300
Last active March 14, 2024 09:00 — forked from rkkoszewski/gist:aa531cee7126edf329b76bdd0546f502
Notes for installing XorgXrdp and Xrdp with GLAMOR support
THIS ARE MY NOTES OF BUILDING AN INSTALLING XORGXRDP AND XRDP WITH GPU ACCELERATION
TESTED ON UBUNTU 20.04.2 with amdgpu (all-open variant) driver and FirePro W4100 GPU
-- Build XorgXrdp with GPU acceleration ("script" - to be adjusted to your needs) : --
## << BUILD AND INSTALL SCRIPT START >> ##
#!/bin/bash
# Install Latest XRDP with XORGXRDP
# README
@Nexarian
Nexarian / xrdp-nvidia-setup.sh
Last active May 15, 2024 05:36
Setup for XRDP using Nvidia Acceleration
#!/usr/bin/env bash
set -e
cd ~
sudo -v
# Make sure system is in a good, updated, clean, state.
sudo apt-get -y update