Skip to content

Instantly share code, notes, and snippets.

mscalora / overrides.ini
Created November 24, 2023 16:53
Prusa Slicer Defaults Test INI
perimeters = 4
skirts = 0
first_layer_speed = 18
first_layer_speed = 19

Prusa Slicer Default Print Settings


I hate skirts, I find them to be a big waste of time, a small waste of filament with little or no value. The purge line in the preamble is plenty for my printer. I got tired of turning them off manually every time I used a built-in print setting. By editing this file you can change the built-ins although you have to do this again every time a new "settings update" is applied. In the future I might automate the process with a file watcher mechanism that will run every night or something. I also like to print with at least 3 parimeters and I slow down the first layer by 10% from the usual 20.


mscalora /
Created November 23, 2022 14:34
Python 3 HTTP Server Example
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib import parse
import json
def run_server(port):
class Server(BaseHTTPRequestHandler):
def do_GET(self):
#!/usr/bin/env node
# credit to Lenny Domnitser for the logic of this tool, see:
# This tool will fix encoding errors in text files. In my case a sql backup file contained latin1 char
# sequences that appeared like: The “magic” of ’THings’
# Usage: fix_encodings.js <in-file> [<out-file>]

Keybase proof

I hereby claim:

  • I am mscalora on github.
  • I am mscalora ( on keybase.
  • I have a public key ASBipYrZDCrdzGvlafxUvRxpYnb_7D_AWslP7efmBgH5vAo

To claim this, I am signing this object:

mscalora / ttd_dom_ready.js
Created April 3, 2021 11:35
simplified ttd_dom_ready - does not support (old) IE
(function (){
window.ttd_dom_ready = window.ttd_dom_ready || function (cb) {
if (document.readyState === "complete" ||
(document.readyState !== "loading" && !document.documentElement.doScroll)) {
} else {
let mcb = () => {
document.removeEventListener("DOMContentLoaded", mcb);
mscalora / counter.html
Last active March 15, 2021 13:38
Perfect JS Counter
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
html {
height: 100%;
margin: 0;
padding: 0;
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>☃️</text></svg>">
mscalora / spin-the-needle.js
Created April 1, 2020 18:48
Work towards a spin the needle animation using SVG
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
// From: NicolasLetellier @
function objectDiff(object, base) {
function changes(object, base) {
const accumulator = {};
Object.keys(base).forEach((key) => {
if (object[key] === undefined) {
accumulator[`-${key}`] = base[key];