Skip to content

Instantly share code, notes, and snippets.

View Yardboy's full-sized avatar

Cayce Balara Yardboy

View GitHub Profile
remote: Compilation failed:
remote: events.js:174
remote: throw er; // Unhandled 'error' event
remote: ^
remote:
remote: Error: spawn bin/rails EACCES
remote: at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
remote: at onErrorNT (internal/child_process.js:415:16)
remote: at process._tickCallback (internal/process/next_tick.js:63:19)
remote: Emitted 'error' event at:
if(creep.memory.transfering) {
if (creep.store[RESOURCE_ENERGY] == 0) {
creep.memory.transfering = false;
creep.say('🔄 harvest');
}
} else if(creep.store.getFreeCapacity() == 0) {
creep.memory.transfering = true;
creep.say('transfering');
} else {
[whatever]
@Yardboy
Yardboy / gist:511027972af259a44eb4f1e867eb67d6
Last active April 11, 2023 16:50
Create a custom post processing filament change script to workaround Creality latest Sonic Pad firmware

Intro

Creality's latest Sonic Pad update, v1.0.6.46.25, includes an internal M600 macro for a filament change, which will conflict with any custom M600 macro the user has included in their config. As such, the user is forced to remove their own M600 macro, if they have one, due to the conflict. Because the Creality macro is not accessible to the user, it cannot be tweaked. And, to make matters worse, it has a bug related to max extrusion distance, so you cannot successfully print a model with a filament change with this update installed.

The below workaround shows you how to go back to using your own M600 macro by renaming it, and how to create a modified Cura Filament Change post processing script to insert this new macro instead of M600.

UPDATE SONIC PAD CONFIGURATION

In your Sonic Pad printer.cfg, add your own M600 macro back in, but name it CUSTOM_FILAMENT_CHANGE:

@Yardboy
Yardboy / avatar_component.rb
Last active August 14, 2024 22:46
A Rails view component to display an initials avatar using tailwindcss and dev.to color generating algorithm
# frozen_string_literal: true
class AvatarComponent < ApplicationComponent
# https://dev.to/admitkard/auto-generate-avatar-colors-randomly-138j
DEFAULT_COLOR = [240, 2, 85].freeze
HRANGE = [0, 360].freeze
SRANGE = [40, 60].freeze
LRANGE = [40, 60].freeze