Skip to content

Instantly share code, notes, and snippets.

@ospalh
ospalh / cancel.gcode
Created November 12, 2019 07:19
My 3d-printer cancel gcode
M104 S0 T0 ; turn off tool 0 heating
M140 S0 ; Turn off bed heating
M83 ; relative extruder mode
G1 E-2 F2400 ; Retract 2 mm, standard during prints
M82 ; absolute extruder mode.
G91 ; relative move
G1 Z5 F300 ; move z up by 2 mm. N.B.: Check there is space (but we have the software endstop)
M84 ; disable motors
M77 ; stop print timer
@ospalh
ospalh / Configuration.h
Created April 16, 2017 15:03
Marlin firmware configuration file for my GEEETech i3 pro C
/**
* 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
@ospalh
ospalh / memgrab.ScanTailor
Created September 6, 2016 10:10
memgrab.ScanTailor. Don’t try auto dewarp on this
<project outputDirectory="/home/notme/use/relinker/memgrab/out" layoutDirection="LTR">
<directories>
<directory path="/home/notme/use/relinker/memgrab" id="1"/>
</directories>
<files>
<file dirId="1" id="2" name="empty.png"/>
</files>
<images>
<image subPages="1" fileImage="0" fileId="2" id="3">
<size width="1516" height="2204"/>
@ospalh
ospalh / halfwidthify.py
Last active August 29, 2015 14:16
Script to copy KanjiVG characters and half the canvas size.
#! /usr/bin/env python3
# -*- coding: utf-8 ; mode: python -*-
#
# © Copyright 2015 Roland Sieker <ospalh@gmail.com>
#
# License: GNU AGPL, version 3 or later;
# http://www.gnu.org/licenses/agpl.html
"""
"""
@ospalh
ospalh / fullwidthify.py
Created March 4, 2015 10:42
A Python script that copied the KanjiVG files for the ASCII letters to the CJK full width range.
#! /usr/bin/env python3
# -*- coding: utf-8 ; mode: python -*-
#
# © Copyright 2015 Roland Sieker <ospalh@gmail.com>
#
# License: GNU AGPL, version 3 or later;
# http://www.gnu.org/licenses/agpl.html
"""Copy the latin “kanji” to the full width positions
"""
@ospalh
ospalh / gist:70bea8c67b305951d15a
Created February 2, 2015 12:18
My .git_ignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc
*.pyo
@ospalh
ospalh / codes and characters
Created November 20, 2014 13:51
The radicals moved to the sides. See https://github.com/KanjiVG/kanjivg/pull/92
02e8c ⺌
02e8d ⺍
02ea1 ⺡
02ea4 ⺤
02ea6 ⺦
02ea8 ⺨
034c1 㓁
04ea0 亠
04ebb 亻
05196 冖
0004b K:
close enough
02e8c ⺌:
close enough
02e8d ⺍:
close enough
03006 〆:
close enough
03044 い:
close enough
@ospalh
ospalh / copy-strokes-and-positions.py
Last active August 29, 2015 14:05
Extract stroke data and number positions out of an SVG file and put them into a KanjiVG file
#! /usr/bin/env python3
# -*- coding: utf-8 ; mode: python -*-
# © Copyright 2014 Roland Sieker <ospalh@gmail.com>
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
"""Copy data from general SVG file to KanjiVG file
This is a helper script to copy data back from an SVG file edited with
a graphical editor such as inkscape to an KanjiVG SVG file.
@ospalh
ospalh / changes done
Last active August 29, 2015 14:02
Sorting of KanjiVG files for JIS X 0213 2000→2004 changes
050c5 僅 Made stroke 11 longer
0514e 兎 Joined strokes 5 + 6
051a4 冤 Use 刀 element for strokes 3, 4
053a9 厩 Use left inner element similar to central element of 0537f etc.
053db 叛 Turned strokes 1, 2, closed strokes 8, 9
053df 叟 Split bottom of 臼, rearraged stroke order. Draw vertical first, added vertical-last variant.
05632 嘲 Use variant of 月
056c0 囀 Made stroke 16 longer, stroke 17 straight
05a29 娩 Joined strokes 8 + 10
05c60 屠 Added dot to 白-ish bit in modified 者 element