Skip to content

Instantly share code, notes, and snippets.

Avatar

Andreas Pettersson NeoTech

  • Roughedge AB
  • Sweden
  • 19:02 (UTC +02:00)
View GitHub Profile
@NeoTech
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();
console.log(a);
// Encodes the bitorder back into a stored mask value.
var x = parseInt(a.reverse().join('').toString(), 2);
console.log(x);
@NeoTech
NeoTech / cetus3dmk2_cura_profile.md
Last active February 11, 2021 23:48
Cetus3D MK2 Cura profile
View cetus3dmk2_cura_profile.md

Start settings for cura std cetus mk2

;---Start GCODE CURA for CETUS MKII--
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
NeoTech / Marlincode.md
Created February 9, 2021 15:43
Artillery X1 Marlin settings.
View Marlincode.md

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
NeoTech / linuxcnc_machinekit_build.md
Last active January 4, 2021 22:28
LinuxCNC Machinekit Package Build
View linuxcnc_machinekit_build.md

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

Reboot..

View busbox.yaml
apiVersion: v1
kind: Service
metadata:
name: nginx-nodeport
namespace: default
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
@NeoTech
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
NeoTech / xompmgr_openbox.sh
Created April 15, 2017 08:50
xcompmgr_openbox
View xompmgr_openbox.sh
#!/bin/bash
# Openbox Pipe Menu for xcompmgr
# Written for CrunchBang Linux <http://crunchbang.org/projects/linux/>
# by Philip Newborough (aka corenominal) <mail@philipnewborough.co.uk>
# 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
NeoTech / vim_cheatsheet.md
Created November 5, 2016 22:39 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts
View vim_cheatsheet.md

Introduction

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

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@NeoTech
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:

tmux

start new with session name:

tmux new -s myname
@NeoTech
NeoTech / csv2xlsx.pl
Created November 30, 2015 10:32
csv2xlsx
View csv2xlsx.pl
#!/usr/bin/perl
# http://cpansearch.perl.org/src/HMBRAND/Text-CSV_XS-1.01/examples/csv2xls
# 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.