Skip to content

Instantly share code, notes, and snippets.

View luruke's full-sized avatar

Luigi De Rosa luruke

View GitHub Profile
$0 = 10 (Step pulse time, microseconds)
$1 = 25 (Step idle delay, milliseconds)
$2 = 0 (Step pulse invert, mask)
$3 = 1 (Step direction invert, mask)
$4 = 0 (Invert step enable pin, boolean)
$5 = 1 (Invert limit pins, boolean)
$6 = 0 (Invert probe pin, boolean)
$10 = 2 (Status report options, mask)
$11 = 0.010 (Junction deviation, millimeters)
$12 = 0.002 (Arc tolerance, millimeters)
@luruke
luruke / smashingmagazine.js
Last active January 12, 2022 15:34
Source code of the demo "Improving User Flow Through Page Transitions" on Smashing Magazine.
/*
https://www.smashingmagazine.com/2016/07/improving-user-flow-through-page-transitions/
You can copy paste this code in your console on smashingmagazine.com
in order to have cross-fade transition when change page.
*/
var cache = {};
function loadPage(url) {
if (cache[url]) {
@luruke
luruke / bunny.js
Created October 27, 2018 07:51
draw bunny on terminal
const drawille = require('drawille')
const bunny = require('bunny')
const glmatrix = require('gl-matrix')
const width = 200
const height = 200
const canvas = new drawille(width, height)
const mat4 = glmatrix.mat4
const vec3 = glmatrix.vec3
let points = []
@luruke
luruke / PostFX.js
Last active January 13, 2024 09:05
Simple example of postprocessing in three.js
/*
To use it, simply declare:
`const post = new PostFX(rendering);`
Then on update, instead of:
`rendering.render(scene, camera);`
replace with:
`post.render(scene, camera);`
*/
import {