Skip to content

Instantly share code, notes, and snippets.

View PavelTajdus's full-sized avatar

Pavel Tajduš PavelTajdus

View GitHub Profile
#####################################################################
# X/Y Stepper Settings
#####################################################################
[stepper_x]
step_pin: PF13
dir_pin: PF12
enable_pin: !PF14
rotation_distance: 40
microsteps: 32
[pause_resume]
[gcode_macro M600]
gcode:
{% set X = params.X|default(50)|float %}
{% set Y = params.Y|default(0)|float %}
{% set Z = params.Z|default(10)|float %}
SAVE_GCODE_STATE NAME=M600_state
PAUSE
G91
G1 E-.8 F2700
[include mainsail.cfg]
# This file contains common pin mappings for the BigTreeTech Octopus V1.
# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader"
# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference
# after running "make", copy the generated "klipper/out/klipper.bin" file to a
# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card.
# See docs/Config_Reference.md for a description of parameters.
// abychom si pole mohli uložit do strojově čitelné podoby
// vytvoříme z nich json data
$json = json_encode($data);
// tyto data uložíme do souboru
$file = fopen(__DIR__ . '/covid.json', 'w');
fwrite($file, $json);
fclose($file);
$data = array(
"total" => 7000,
"man" => 3000,
"woman" => 4000,
"averageAge" => 40,
"lastUpdate" => 1588746611
);
@PavelTajdus
PavelTajdus / Configuration_adv.h
Created February 6, 2018 10:57
Anycubic Prusa i3 ultrabase Marlin 1.1.8 configuration
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@PavelTajdus
PavelTajdus / Configuration.h
Last active July 28, 2022 13:41
Anycubic Prusa i3 ultrabase Marlin 1.1.8 configuration
/**
Marlin 3D Printer Firmware
Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
Based on Sprinter and grbl.
Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@PavelTajdus
PavelTajdus / versioning.php
Created June 23, 2017 06:58
Processwire CSS and JS versioning
// Versioning of CSS + JS
$assets_path = $config->paths->templates . "assets/";
$assets_url = $config->urls->templates . "assets/";
$file_css = "app.css";
$file_js = "app.min.js";
if (file_exists($assets_path . $file_css)) {
$css_version_addon = "?v" . date("His", filemtime($assets_path . $file_css)); // Time of last change 23h 59m 59s in format 235959
} else {