Skip to content

Instantly share code, notes, and snippets.

View ctrochalakis's full-sized avatar

Christos Trochalakis ctrochalakis

View GitHub Profile
@kmobs
kmobs / Adxl Understanding.md
Last active December 20, 2023 16:01
Demystifying some ADXL understandings

ADXL Demystification

There is a lot of confusion as to how to get good ADXL graphs. For many, the issue is printer build and rigidity. For others, there is often an issue with ADXL mounting or noise. Like all of my guides, this is targeted at people chasing the highest performance with quality. If your quality and speeds are fine for you, stop reading as this guide isn't for you.

There are a few parameters that play into your measured values and this will break down the most straightforward. Broadly, they are mass and stiffness. This explanation will not be true in every single instance, and is definitely not PhD level physics, but should at least help with the broad understanding of what your printer is doing.

Technical

The easiest way to think about it is if you start by thinking of your printer as an undamped simple harmonic oscillator.

// Tailscale Frontend: It uses tailscale-as-a-library to
// listen on a port, independently from the operating system network, i.e. you
// can run an nginx server on :80 and :443 without impacting the frontend.
//
// set up DNS, e.g.:
// prometheus.ts.zekjur.net A 100.117.6.125
//
// frontend% TAILSCALE_USE_WIP_CODE=true tailscalefrontend -hostname=srv.example.net [email protected]
//
// (first login requires running with TS_LOGIN=1 environment variable to print link for the browser)
@pihentagy
pihentagy / obsidian.css
Created October 9, 2020 09:34
Clutter free edit mode
/* inline formatting, link targets and [[ ]] disappears if not active line*/
div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-formatting,
div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-string.cm-url,
div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-formatting-link,
div:not(.CodeMirror-activeline)>.CodeMirror-line span.cm-hmd-barelink,
div:not(.CodeMirror-activeline)>.CodeMirror-line span.cm-comment
{ display: none; }
/* hide all html tags -- IT IS COMMENTED OUT BY DEFAULT */
/* div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-tag{ display: none; } */
@samael500
samael500 / handler.lua
Last active August 25, 2023 15:11
Validating payloads from GitHub webhooks with Nginx + Lua
-- luarocks install JSON4Lua
-- luarocks install luacrypto
local json = require "json"
local crypto = require "crypto"
local secret = '<MY SUPER SECRET>'
local event = 'push'
local branch = 'refs/heads/master'
# Copyright 2017 Robert Wissmann
#
# 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:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR T
@jprante
jprante / es-1.2-settings.md
Last active March 20, 2020 02:42
Elasticsearch 1.2 settings and description
#!/bin/bash
NET=10.0.0.0/16
# i.e. 256Kbit/s
RATE_OUT=$1
# i.e. 6Mbit/s
RATE_IN=$2
DELAY_IN=$3
DELAY_OUT=$4
@funny-falcon
funny-falcon / falcon.patch
Created September 14, 2012 12:07
Performance patch for ruby-1.9.3-head (applies to p194 as well)
diff --git a/array.c b/array.c
index 64647c3..618d9e3 100644
--- a/array.c
+++ b/array.c
@@ -255,15 +255,24 @@ rb_ary_modify(VALUE ary)
rb_ary_modify_check(ary);
if (ARY_SHARED_P(ary)) {
long len = RARRAY_LEN(ary);
+ VALUE shared = ARY_SHARED(ary);
if (len <= RARRAY_EMBED_LEN_MAX) {
@funny-falcon
funny-falcon / 00-description.md
Created September 14, 2012 12:05
Patches against ruby-1.9.3-head

This is falcon.patch splitted to be reviewed.

  • 01-cached-lp.diff - Cached expanded $LOAD_PATH - speedups startup
  • 02-sorted-lf.diff - Sorted $LOADED_FEATURES - tiny speedup startup
  • 03-st_opt.diff - Some improvements for hash creation
  • 04-sparse_array.diff - Performance improvement for methods/constants/instance variable offset tables
  • 05-ary-queue.diff - make array to be fully suitable as queue
  • 06-st_opt_sparse_array.diff - 03 + 04
  • 07-backport-gc.diff - backport of COW friendly GC
@bandito
bandito / icmdct.c
Created May 1, 2012 17:44
Mp3 decoder
#include "typedefs.h"
#include "imdct.h"
#define SPECTRUM_POS *(i16 *)0x1080 //
static i16 tmp[18];
static i16 u[2][2][17][16]; /* no v[][], it's redundant */
static int u_start[2]={0,0}; /* first element of u[][] */
static int u_div[2]={0,0}; /* which part of u[][] is currently used */