Skip to content

Instantly share code, notes, and snippets.

View eip's full-sized avatar

Ed Popsuev eip

  • Ukraine
View GitHub Profile
; Start G-Code
G21 ;set units to millimeters
G90 ;use absolute positioning
M104 S{material_print_temperature_layer_0} ;set extruder temp
M140 S{material_bed_temperature_layer_0} ;set bed temp
G28 ;Home all axes
;G1 Z5.0 ;move platform down 5mm ;off for 2.0.3 firmware
G1 X0 Y20 F5000.0 ;move to intro line start position
M190 S{material_bed_temperature_layer_0} ;wait for bed temp
M109 S{material_print_temperature_layer_0} ;wait for extruder temp
@eip
eip / jiggler.js
Created November 16, 2025 15:51
Keep your Mac awake by jiggling the mouse
#!/usr/bin/env osascript -l JavaScript
ObjC.import("Cocoa");
ObjC.import("CoreGraphics");
function screenSize() {
const w = $.NSScreen.mainScreen.frame.size.width;
const h = $.NSScreen.mainScreen.frame.size.height;
return { w, h };
}
@eip
eip / clear-cookies.applescript
Last active May 27, 2026 10:27
Clear all cookies for the active Safari tab
-- clear-cookies.applescript
-- Clears ALL cookies for the active Safari tab by driving
-- Web Inspector's Storage panel via Accessibility API.
-- Uses polling loops instead of fixed delays — faster and more reliable.
--
-- Prerequisites:
-- Safari > Settings > Advanced > "Show features for web developers" — ON
-- System Settings > Privacy & Security > Accessibility — grant Terminal/iTerm
tell application "Safari" to activate
@eip
eip / copy-screenshot.sh
Created August 9, 2026 12:44
Copy macOS retina screenshot as 72 dpi low-resolution
#!/usr/bin/env zsh
setopt ERR_EXIT NO_UNSET PIPE_FAIL
if (( $# > 1 )); then
print -u2 "Usage: ${0:t} [png-file]"
exit 2
fi
if (( $# == 1 )); then