Skip to content

Instantly share code, notes, and snippets.

View challgren's full-sized avatar

Chris Hallgren challgren

View GitHub Profile
@challgren
challgren / KAMP_Settings.cfg
Created January 30, 2024 07:47
Ender 3 v2 Neo SKR 3 EZ Board
# Below you can include specific configuration files depending on what you want KAMP to do:
[include ./KAMP/Adaptive_Meshing.cfg] # Include to enable adaptive meshing configuration.
[include ./KAMP/Line_Purge.cfg] # Include to enable adaptive line purging configuration.
# [include ./KAMP/Voron_Purge.cfg] # Include to enable adaptive Voron logo purging configuration.
[include ./KAMP/Smart_Park.cfg] # Include to enable the Smart Park function, which parks the printhead near the print area for final heating.
[gcode_macro _KAMP_Settings]
description: This macro contains all adjustable settings for KAMP
@challgren
challgren / vpc.yaml
Created January 10, 2023 19:20 — forked from milesjordan/vpc.yaml
Cloudformation template for a VPC with ipv6, with public and private subnets, calculating the subnet ipv6 CIDR blocks on the fly.
---
AWSTemplateFormatVersion: '2010-09-09'
Description: Public VPC and subnets
Resources:
#
# Public VPC
#
PublicVpc:
@challgren
challgren / SumCacheBehavior.php
Created March 24, 2019 05:25
CakePHP's SumCache (Modified CounterCache)
<?php
namespace App\Model\Behavior;
use Cake\Datasource\EntityInterface;
use Cake\Event\Event;
use Cake\ORM\Association;
use Cake\ORM\Behavior;
use Cake\ORM\Entity;
@challgren
challgren / UpdateCounterCache.php
Created March 9, 2019 23:07 — forked from hmic/UpdateCounterCache.php
Cake3 update counter caches for association
<?php
namespace App\Model\Table\Behavior;
trait UpdateCounterCacheTrait {
public function cleanupBelongsToMany($return_count = null) {
if($return_count) {
return $count;
}
return $this;