Skip to content

Instantly share code, notes, and snippets.

💭
gameJam

Jonas Anton Östman jonasbits

💭
gameJam
Block or report user

Report or block jonasbits

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dpopper-arduino.cpp
/* 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
@jonasbits
jonasbits / bookmarklet-step.js
Last active Jan 5, 2020
TDD for Autodesk Tinkercad Circuits ( git@gist.github.com:02afd475f46cd78a4607ac55765e50df.git )
View bookmarklet-step.js
//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 Oct 10, 2019
makersLink_think_with_portals
View makersLink.json
@jonasbits
jonasbits / .main.cpp
Last active Oct 8, 2019
Uno or F103RB build files in PlatformIO (subset of files, please read main.cpp and platformio.ini)
View .main.cpp
#include <Arduino.h>
#if defined ARDUINO_AVR_UNO || defined ARDUINO_AVR_LEONARDO
#include <Arduino_FreeRTOS.h>
#elif defined ARDUINO_NUCLEO_F103RB
#include <STM32FreeRTOS.h>
#elif defined ARDUINO_DISCO_L072CZ_LRWAN1
#include <STM32FreeRTOS.h>
#endif
@jonasbits
jonasbits / config.txt
Created Aug 21, 2019
konstpaj umeahackerspace autoplay video on rpi
View config.txt
#Umeå Hackerspace konstpaj self-explanatory configuration file
term=1
xres=1920
yres=1080
# auto=0, analogue=1, hdmi=2
aout=0
vol=0
background="black.ppm"
videofolder="videos"
@jonasbits
jonasbits / dnsseeder.json
Last active Dec 12, 2019
dnsseeder.json with values for namecoin
View dnsseeder.json
{
"Name": "Namecoin",
"Desc": "Description of Namecoin",
"ID": "0xfeb4bef9",
"Port": 8334,
"Pver": 70001,
"TTL": 600,
"InitialIP": "127.0.0.1",
"DNSName": "dnsseed.nmctest.net",
"Seeder1": "nmc.seed.quisquis.de",
@jonasbits
jonasbits / libserialport example.c
Last active Dec 17, 2018 — forked from ntd/libserialport example.c
libserialport example
View libserialport example.c
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <unistd.h> // for sleep function
#include <libserialport.h> // cross platform serial port lib
//#include "protocol.h"
//const char* desired_port = "COM8";
@jonasbits
jonasbits / RegexTest.java
Created Oct 11, 2017
Inverse regex to match non .bit urls
View RegexTest.java
//compile with 'javac RegexTest.java'
//run with java RegexTest example.com
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegexTest {
public static void main(String[] args) {
//line bellow does not work, must include regex inline instead
@jonasbits
jonasbits / dualshock-research
Created Jan 11, 2017 — forked from johndrinkwater/dualshock-research
I’m interested in writing (or helping to spec out the protocol so someone else can write) the linux kernel driver for Sony’s DualShock 4 (PS4’s lovely controller) Currently using the output of HID RAW from a USB connected dualshock 4… For the gyro/touchpad discovery, I’ve just been using some terrible c code to throw numbers on the screen and it…
View dualshock-research
TADA, it’s `hexdump -v -e '64/1 "%02x" "\n"' < /dev/hidraw3`
No idea what the first byte is… but I’m going to assume its for device ID for the many users that are connected, but it probably has to be set by the connected machine?
01ff777f7f0800aa0000435dfdf1ff14000200c5ff0721150300000000001b000001fc9133a32990880428008000000080000000008000000080000000008000
↑↑↑↑
left stick, value, first field is horz (00 left), second field is vertical (00 top)
017f80ff61080064000059f2fdfffffbff0e00d107081e9bf600000000001b0000018e94b1b00690880428008000000080000000008000000080000000008000
↑↑↑↑
You can’t perform that action at this time.