Skip to content

Instantly share code, notes, and snippets.

View jonasbits's full-sized avatar

Jonas Anton Östman jonasbits

View GitHub Profile
#! /usr/bin/env bash
/usr/bin/cvlc -A alsa --play-and-exit /home/jonasbits/vlc-file/sample-15s.mp3 &>> /tmp/log.txt
@jonasbits
jonasbits / csdinfo
Created March 31, 2022 09:36 — forked from sharow/csdinfo
SD card CSD register formatter (for Raspberry Pi)
#!/usr/bin/env python2
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; coding: utf-8; -*-
# usage:
# $ cat /sys/devices/platform/mmc_host/mmcXXXX/mmcYYYY/csd | csdinfo
#
# reference:
# 'Physical Layer Simplified Specification Version 3.01'
# https://www.sdcard.org/downloads/pls/simplified_specs/Part_1_Physical_Layer_Simplified_Specification_Ver_3.01_Final_100518.pdf
@jonasbits
jonasbits / bookmarklet-gps2url.js
Created May 31, 2021 15:20
Helper to extract WGS84 DD coordinates from a webGui
//javascript:(function(){ <-remember this beginning when creating bookmarklets
javascript:(function(){
var version = 3; /*2021-05-31 17:14 */
var final = 0;
function extractWSG() {
if(document.scripts[14].src == "" && final == 0) {
@jonasbits
jonasbits / tarantula-probe-start-gcode.txt
Created April 11, 2021 11:13
tarantula-probe-start-gcode.txt
;[0] FALASA START GCODE 2021-04-11
;CURA NEEDS SPACES INSTEAD OF TABS TO DISPLAY NICELY
G21 ;[1] metric values
G90 ;[2] absolute positioning
M82 ;[3] set extruder to absolute mode
M107 ;[4] start with the fan off
G28 X0 Y0 ;[5] move X/Y to min endstops
;TODO conditional, if hotend is above 170, then flush oz
G28 Z0 ;[6] move Z to min endstop (middle X,Y)
G1 Z3.0 F1000 ;[7] move nozzle from bed 3 mm
@jonasbits
jonasbits / assortment_chappel.scad
Created September 9, 2020 16:04
inspired from www.youtube.com/watch?v=CHFK5sY8ToE&feature=youtu.be&t=1176 by Alexandre Chappel, this is a reverse engineered design made in openscad
//inspired from
//www.youtube.com/watch?v=CHFK5sY8ToE&feature=youtu.be&t=1176
//reverse engineered design made by Alexandre Chappel
//original was made in Fusion 360
//www.patreon.com/chappel
revision=7;
//link to my comment on above video
//www.youtube.com/watch?v=CHFK5sY8ToE&lc=UgzBCuqLaLH0w67O-JJ4AaABAg
@jonasbits
jonasbits / makerslink-furniture.scad
Last active May 9, 2020 07:23
makerslink_furniture
/* final version 1.23.25
This is simulating a POP3 server
running on an Arduino
with a ESP-01 wifi module.
ESP-01 is not initilized because
the libraries is missing from Tinkercad Circuits.
We are emulating tx and rx from Serial Monitor.
It should be possible to include Dummy libraries
if there was #ifdef TINKERCAD made available
#ifdef ARDUINO
#include <Arduino.h>
#else
#include <iostream>
#endif
#include <string.h>
#define YES 1
#define NO 2
@jonasbits
jonasbits / bookmarklet-step.js
Last active January 5, 2020 17:40
TDD for Autodesk Tinkercad Circuits ( [email protected]:02afd475f46cd78a4607ac55765e50df.git )
//javascript:(function(){ <-remember this beginning when creating bookmarklets
javascript:(function(){
var txField = document.getElementsByClassName("js-code_panel__serial__input")[0];
var sendBtn = document.getElementsByClassName("js-code_panel__serial__send")[0];
var newHash = 0;
/*step debug (use this comment style)*/
if(window.location.hash) {
var hash = window.location.hash.substring(1);
@jonasbits
jonasbits / makersLink.json
Last active October 10, 2019 22:29
makersLink_think_with_portals