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
@Nexarian
Nexarian / xrdp-nvidia-setup.sh
Last active November 12, 2024 03:03
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
@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
@sbyx
sbyx / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active November 14, 2024 08:25
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').
@rkkoszewski
rkkoszewski / gist:aa531cee7126edf329b76bdd0546f502
Last active September 6, 2024 21:44
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
@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");
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'
@eeropic
eeropic / paste-svg-from-clipboard-paper.js
Last active August 11, 2024 20:47
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());
@geowa4
geowa4 / digitalocean.sh
Last active March 12, 2019 09:30
Dynamic inventory for DigitalOcean grouping by tag.
#!/usr/bin/env bash
set \
-o nounset \
-o pipefail \
-o errexit
tags=$(doctl compute tag list --output json | jq -r '.[].name')
aggregate=$(jq -n '{ "_meta": { "hostvars": { } } }')
@mattattui
mattattui / index.html
Last active October 24, 2020 11:28
Vue + Paper
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Shape selection</title>
<!-- Vue for doing stuff-->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- Paper for handling graphics -->
<script src="https://unpkg.com/[email protected]/dist/paper-full.min.js"></script>
<!-- Axios for making API calls -->
@lehni
lehni / index.html
Last active December 25, 2023 10:49
Paper.js Bézier Offsetting
<!DOCTYPE html>
<html>
<head>
<!--
Copyright (c) 2014-2017, Jan Bösenberg & Jürg Lehni
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell