Skip to content

Instantly share code, notes, and snippets.

View tuannat's full-sized avatar

Tuan Nguyen tuannat

View GitHub Profile
@tuannat
tuannat / Snapshots.cfg
Created May 8, 2023 02:06 — forked from wbatty/Snapshots.cfg
Example of how to setup Klipper to use the gocode_shell_command to do timelapse (pre mainsail built in timelapse)
# Requires `gcode_shell_command` extension to Moonraker (installing via KIUAH is the easy way)
# Requires gphoto2 http://www.gphoto.org/
[gcode_shell_command gphoto2_trigger_snapshot]
command: gphoto2 --auto-detect --trigger-capture
timeout: 10. ; make sure this is long enough to account for focus time
verbose: True
[gcode_shell_command gphoto2_init_camera]
command: gphoto2 --auto-detect --set-config capturetarget=1
[printer]
kinematics: delta
max_velocity: 250
max_accel: 2500
max_accel_to_decel: 999999
max_z_accel: 2500
minimum_z_position: 0
square_corner_velocity: 5
print_radius: 130 #
@tuannat
tuannat / readme.md
Created December 18, 2021 04:08 — forked from ChipCE/readme.md
Klipper bed mesh on print area only macro install guide

Klipper mesh on print area only install guide

What this macro do

  • This macro will dymanic change the bed_mesh area based on the size of the printed part. The fw will only probe on the area that the part will be printed (plus mesh_area_offset value)

Setup guide

  • (1) Add the following macrro to your printer config, this will replace the default BED_MESH_CALIBRATE command.
@tuannat
tuannat / add_printer.png
Created December 1, 2021 00:00
notes on how to multiply klipper-instances (and moonraker) to have a multi-printer setup using https://github.com/cadriel/Fluidd (and/or https://github.com/cadriel/FluiddPI)
add_printer.png

Fixing npm On Mac OS X for Homebrew Users

If you just want to fix the issue quickly, scroll down to the "solution" section below.

Explanation of the issue

If you're a Mac Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you will see an error like this:

$ npm update npm -g
@tuannat
tuannat / CSS-modal.markdown
Created February 23, 2015 09:54
CSS modal
{
"auto_complete_delay": 500,
"caret_style": "solid",
"color_scheme": "Packages/Theme - Flatland/Flatland Monokai.tmTheme",
"detect_indentation": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*.pyc",
#!/bin/sh
# Sublime Text 3 install with Package Control
# http://simonewebdesign.it/install-sublime-text-3-on-linux/
# Run this script with:
# $ curl -L git.io/sublimetext | sh
# Detect the architecture
@tuannat
tuannat / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
[alias]
ci = commit
br = branch
co = checkout
df = diff
st = status -b -s
last = log -1 HEAD
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
testmerge = merge --no-commit --no-ff
unstage = reset HEAD