Skip to content

Instantly share code, notes, and snippets.

View ktgw0316's full-sized avatar

Masahiro Kitagawa ktgw0316

  • Aichi, Japan
  • 15:29 (UTC +09:00)
View GitHub Profile
@alexqzd
alexqzd / gcode_feature_type_message.py
Created August 17, 2021 02:05
PrusaSlicer post-processing script to show on the LCD screen which type of feature is currently being printed.
#!/usr/bin/python
import sys
import re
import os
import sys
sourceFile = sys.argv[1]
# Read the ENTIRE g-code file into memory
with open(sourceFile, "r") as f:
@Tandrial
Tandrial / iterTools.kt
Last active November 26, 2023 08:12
Pythons iterTools in Kotlin
/*
* Copyright (c) 2019 Michael Krane
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
@DomPizzie
DomPizzie / README-Template.md
Last active May 1, 2026 20:23
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started

@james-d
james-d / PanningTiledPane.java
Last active July 16, 2018 23:36
Example of (essentially) infinite panning in JavaFX using a fixed set of ImageViews and updating their images on panning. Prototype for Google Maps type of interface.
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.DoublePropertyBase;
import javafx.beans.property.ReadOnlyIntegerWrapper;
import javafx.geometry.Pos;
@james-d
james-d / PlutoExplorer.java
Last active May 2, 2024 16:33
Zoomable and Pannable JavaFX ImageView Example
import javafx.application.Application;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.geometry.Insets;
import javafx.geometry.Point2D;
import javafx.geometry.Pos;
import javafx.geometry.Rectangle2D;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Hyperlink;
/* Delayを使わないArduino時計
Arduinoにはシステム時刻があって、RTCを持たないArduinoでは
起動時必ず1970/01/01T00:00:00Z(UNIX epoch)に初期化されています
Arduinoのコンパイラでは__DATE__定数と__TIME__定数が使えますので、
コンパイル時に埋め込まれるこれらの定数を利用してシステム時刻を
設定します。
当然ながら、コンパイル時にコンパイラがあるシステムの時刻が定数
として埋め込まれますので、コンパイル直後以外のArduinoリセット時
には時刻が狂うことになります。
DS1307RTCのライブラリを参考にした。
@maxd
maxd / modena.css
Last active September 17, 2025 06:58
modena.css from JDK 10.0.1
/*
* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
@jewelsea
jewelsea / PannableView.java
Last active July 12, 2021 19:11
Create a pannable map background in JavaFX
import javafx.application.Application;
import static javafx.application.Application.launch;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ScrollPane;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.Pane;