Skip to content

Instantly share code, notes, and snippets.

View canadaduane's full-sized avatar

Duane Johnson canadaduane

View GitHub Profile
@canadaduane
canadaduane / package.json
Last active April 13, 2023 14:25
Using Turborepo for build and Overmind for process management
View package.json
{
//... snip ...
"scripts": {
"dev": "sh -c '(export TURBO_ARGS=\"${*}\"; turbo dev:deps $TURBO_ARGS && overmind start --root . --no-port --procfile $(node run-dev.mjs))' zero",
"dev:dry": "turbo dev --dry=json $TURBO_ARGS"
}
}
@canadaduane
canadaduane / VSCodium.md
Created January 27, 2023 02:44
Some screenshots of VSCodium on Pop!_OS
@canadaduane
canadaduane / Filter-NGPVAN-Political-Emails.md
Last active November 28, 2023 14:22
Move Incoming NGPVAN Political Emails in Gmail to Spam (Google Apps Script)
View Filter-NGPVAN-Political-Emails.md
  1. Go to https://script.google.com
  2. Create a New Project
  3. Replace the Code.gs file it creates for you with the javascript below (copy/paste)
  4. Save the script
  5. Go to Triggers (looks like an alarm clock on left-hand side)
  6. Create a Trigger that acts every 10 minutes and calls filterNGPVANSpam
  7. You'll need to authorize this script to act on your behalf, which may require that you use the scary "Advanced" section to allow the script to read/write to your email inbox.
@canadaduane
canadaduane / myserver.conf
Created April 14, 2020 03:56
nginx configuration for yjs over https reverse proxy
View myserver.conf
server {
listen 80 ;
# listen [::]:80 ipv6only=on;
root /var/www/html;
index index.php index.html index.htm;
server_name y.relm.us;
location / {
@canadaduane
canadaduane / generate_wave.js
Last active June 23, 2019 14:26
Generate Wave card for Game Builder
View generate_wave.js
// User-editable properties for this card:
export const PROPS = [
propNumber('range', 10)
];
// Make surrounding things tagged with "wave" do The Wave
export function onTick() {
card.cycle = (card.cycle || 0) + 1;
let actors = overlapSphere(getPos(), props.range);
@canadaduane
canadaduane / ron-test.sh
Last active May 13, 2019 16:11
Ignorantly trying to use RON swarmdb CLI
View ron-test.sh
./swarmdb new --help
# NotFound$~~~~~~~~~~
# no replica found (.swarmdb)
./swarmdb init
./swarmdb new
# BADARGS$~~~~~~~~~~
# new <rdt> [as objectname] [on BranchName]
# create an empty object of the given type
View StyleDrift.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Principles-of-Adult-Behavior.md

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
@canadaduane
canadaduane / rust-output.txt
Created January 15, 2018 23:32
Can't compile diesel app--what am I missing?
View rust-output.txt
error[E0277]: the trait bound `i64: diesel::deserialize::FromSql<diesel::sql_types::Nullable<diesel::sql_types::BigInt>, _>` is not satisfied
--> src/main.rs:32:10
|
32 | .load::<db::models::Device>(&connection)
| ^^^^ the trait `diesel::deserialize::FromSql<diesel::sql_types::Nullable<diesel::sql_types::BigInt>, _>` is not implemented for `i64`
|
= help: the following implementations were found:
<i64 as diesel::deserialize::FromSql<diesel::sql_types::BigInt, DB>>
View reset_328p.ino
const int rstPin = 7;
void setup() {
pinMode(rstPin, OUTPUT);
// DDRD |= (1 << PD7);
}
void loop() {
// RESET pin goes HIGH