Skip to content

Instantly share code, notes, and snippets.

View JohnScottUK's full-sized avatar

John Scott JohnScottUK

View GitHub Profile
@JohnScottUK
JohnScottUK / Rotate-Tabs.ps1
Last active June 27, 2021 11:27
Script to Control+Tab between Internet Explorer Tabs
<#
.SYNOPSIS
Rotate-Tabs rotates tabs in Internet Explorer with a delay.
.DESCRIPTION
Rotate-Tabs will rotate tabs in Internet Explorer with a delay. It first waits for 20
seconds, counting down to give you time to switch Internet Explorer to the front and
then sends Control+Tab to the browser at regular intervals to switch to the next tab.
.PARAMETER delay
#!/usr/bin/env bash
set -o errexit -o errtrace -o nounset -o pipefail # Robust scripting.
# Find real script name and location...
cd .;origDir="$PWD";origScript="${BASH_SOURCE[0]}";[[ $origScript != */* ]]&&origScript="./$origScript"
realScript="$origScript";scriptName="${origScript##*/}";scriptDir="${origScript%/*}"
while [[ -L $realScript ]];do cd "${realScript%/*}";realScript="$(readlink "${realScript##*/}")";[[ $realScript != */* ]]&&realScript="./$realScript";done
cd -P "${realScript%/*}";realScript="$PWD/${realScript##*/}";realDir="$PWD";realName="${realScript##*/}";cd "$origDir"
#
@JohnScottUK
JohnScottUK / disable-power-loss-recovery.gcode
Created January 29, 2023 10:13
Disable Power-loss recovery on 3D printer.
; https://www.reddit.com/r/ender3/comments/zc1ejz/ender_3_s1_pro_quick_tips_for_setup_from_an/
; Power-loss recovery writes the current state at the end of every layer. This
; can cause blobs. Save this gcode as a print and "print" it. Or use Octoprint/
; Pronterface to execute these commands to disable it.
M501; Load Saved Settings from EEPROM
M413 S0; Disable power-loss recovery
M500; Save Settings on EEPROM
M117 Power-loss Recovery DISABLED; Set the status line message on the LCD.
@JohnScottUK
JohnScottUK / creality_ender3s1pro.prusa.start.gcode
Last active February 29, 2024 10:15
Ender 3 S1 Pro Optimal Start GCode for PruseSlicer/SuperSlicer Software.
; Creality Ender-3 S1 Pro Optimal Start GCode for PrusaSlicer Software.
; By John Scott, 2023. https://gist.github.com/JohnScottUK/b688deeb579d090f96af29c1375513b3
;M117 Set Movement...
G90; Use absolute positioning.
;M117 Heating Bed...
M140 S{first_layer_bed_temperature[0]}; Start heating bed to temperature.
;M117 Homing Axis...
@JohnScottUK
JohnScottUK / creality_ender3s1pro.orca.start.gcode
Last active February 29, 2024 10:15
Ender 3 S1 Pro Optimal Start/Stop GCode for BambuStudio/OrcaSlicer Software.
; Creality Ender-3 S1 Pro Optimal Start GCode for OrcaSlicer Software.
; By John Scott, 2023. https://gist.github.com/JohnScottUK/de30eb8c22993c4405e6afbd9b5db113
;M117 Set Movement...
G90; Use absolute positioning.
;M117 Heating Bed...
M140 S[bed_temperature_initial_layer_single]; Start heating bed.
;M117 Homing Axis...
@JohnScottUK
JohnScottUK / creality_ender3s1pro.cura.start.gcode
Last active March 17, 2024 16:24
Ender 3 S1 Pro Optimal Start/Stop GCode for Creality/Cura Slicer Software.
; Creality Ender-3 S1 Pro Optimal Start GCode for Cura Slicer Software.
; By John Scott, 2023. https://gist.github.com/JohnScottUK/8acd76895716b3abda4fde270738daf3
;M117 Set Movement...
G90; Use absolute positioning.
M83; Use relative extrusion.
;M117 Heating Bed...
M140 S{material_bed_temperature_layer_0}; Start heating bed.