Skip to content

Instantly share code, notes, and snippets.


Andreas Pettersson NeoTech

  • Roughedge AB
  • Sweden
  • 19:02 (UTC +02:00)
View GitHub Profile
NeoTech / accessmask.js
Last active February 26, 2021 10:52
Access mask.
View accessmask.js
// Defines the stored mask value.
var mask = 194;
// Returns a array of reversed bit orders.
var a = parseInt(mask,10).toString(2).split('').reverse();
// Encodes the bitorder back into a stored mask value.
var x = parseInt(a.reverse().join('').toString(), 2);
NeoTech /
Last active February 11, 2021 23:48
Cetus3D MK2 Cura profile

Start settings for cura std cetus mk2

M104 S{material_print_temperature}; set the extruder temperature and go on
M109 S{material_print_temperature}; set the extruder temperature and wait
M82 ; absolute extrusion mode
M204 P3000; set acceleration
G90; sets motion in absolute mode
G92 E0 ; reset step E
G1 Z0 F2000 ;home Z
NeoTech /
Created February 9, 2021 15:43
Artillery X1 Marlin settings.

Start of print.

G28 ; home all axes
M117 Purge extruder
G92 E0 ; reset extruder
G1 Z1.0 F3000 ; move z up little to prevent scratching of surface
G1 X2 Y20 Z0.3 F5000.0 ; move to start-line position
G1 X2 Y200.0 Z0.3 F1500.0 E15 ; draw 1st line
G1 X2 Y200.0 Z0.4 F5000.0 ; move to side a little
G1 X2 Y20 Z0.4 F1500.0 E30 ; draw 2nd line
NeoTech /
Last active January 4, 2021 22:28
LinuxCNC Machinekit Package Build

Howto build LinuxCNC packages and the support packages for Ethercat HAL driver.

Machinekit is in here because these should also apply for other platforms and in general machinekit is more suited for tinkering than linuxcnc at this point in time. Mainly due to the cleaned up repositories and the seperation between hal and cnc. That is all i will get into the politics of these projects..

To run these you should use Debian Buster 10, and using a realtime kernel. To install a realtime kernel just run this command

sudo apt-get update
sudo apt-get install linux-image-rt-amd64 linux-headers-rt-amd64


View busbox.yaml
apiVersion: v1
kind: Service
name: nginx-nodeport
namespace: default
- port: 80
protocol: TCP
targetPort: 80
NeoTech / compton.conf
Created April 15, 2017 09:01
XcompMgr config
View compton.conf
# Shadow
shadow = true;
no-dnd-shadow = true;
no-dock-shadow = true;
clear-shadow = true;
shadow-radius = 12;
shadow-offset-x = -15;
shadow-offset-y = -15;
# shadow-opacity = 0.7;
# shadow-red = 0.0;
NeoTech /
Created April 15, 2017 08:50
# Openbox Pipe Menu for xcompmgr
# Written for CrunchBang Linux <>
# by Philip Newborough (aka corenominal) <>
# Set xcompmgr command options
#EXEC='xcompmgr -c -t-5 -l-5 -r4.2 -o.55' #basic
EXEC='xcompmgr -cCfF -t-5 -l-5 -r4.2 -o.11 -D7 -m.86' # more bling
# Toggle compositing. Call with "xcompmgr_openbox --startstop"
NeoTech /
Created November 5, 2016 22:39 — forked from awidegreen/
Vim shortcuts


  • C-a == Ctrl-a
  • M-a == Alt-a


:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
NeoTech / tmux-cheatsheet.markdown
Last active October 25, 2016 15:17 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
NeoTech /
Created November 30, 2015 10:32
# csv2xls: Convert csv to xls
# (m)'11 [06 Oct 2011] Copyright H.M.Brand 2007-2013
# modified 09/24/2013-11/05/2013 David Rotman, Cedarville University
# Many of these changes are stylistic changes based on personal preferences.
# The original script by H.M.Brand can be used without concern for accurateness
# and functionality.