- I own an Anycubic Kossel delta 3D printer, running custom Marlin firmware, custom mainboard(atmega2560), connected to my PC via USB (USB Serial), controlled mostly via Printrun(Pronterface)
- I want ultra high performance and latest improvements in my 3D printer, with the help from Klipper software/firmware
- Normally you should go get an Raspberry Pi and do everything (compile/install Klipper / OctoPrint) from there, but I don't have a Pi, don't want to mess with the cables, decided to run Klipper from my PC
package main | |
import ( | |
"crypto/rand" | |
"crypto/hmac" | |
"crypto/sha1" | |
"encoding/base32" | |
"time" | |
"fmt" | |
) |
<template lang="html"> | |
<div :class="'img-'+this.mainImgID" id="cvs_thumnails_box"> | |
<canvas id="cvs"> | |
</canvas> | |
<div id="thumbnails"> | |
<div v-for="t in thumbnails" @click="changeImg(t.id)" :class="'thumbnail-'+ t.id" class="thumbnail"> | |
</div> | |
</div> | |
</div> | |
</template> |
Concurrency is a domain I have wanted to explore for a long time because the locks and the race conditions have always intimidated me. I recall somebody suggesting concurrency patterns in golang because they said "you share the data and not the variables".
Amused by that, I searched for "concurrency in golang" and bumped into this awesome slide by Rob Pike: https://talks.golang.org/2012/waza.slide#1 which does a great job of explaining channels, concurrency patterns and a mini-architecture of load-balancer (also explains the above one-liner).
Let's dig in:
- Create 10GB FreeBSD image using QEMU.
- Run the VM using xhyve.
- Mount host directory.
- Resize the image.
- OSX
- Homebrew
// Simple groupcache example: https://github.com/golang/groupcache | |
// Running 3 instances: | |
// go run groupcache.go -addr=:8080 -pool=http://127.0.0.1:8080,http://127.0.0.1:8081,http://127.0.0.1:8082 | |
// go run groupcache.go -addr=:8081 -pool=http://127.0.0.1:8081,http://127.0.0.1:8080,http://127.0.0.1:8082 | |
// go run groupcache.go -addr=:8082 -pool=http://127.0.0.1:8082,http://127.0.0.1:8080,http://127.0.0.1:8081 | |
// Testing: | |
// curl localhost:8080/color?name=red | |
package main | |
import ( |
Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).
The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int
# http://caddyserver.com/download | |
http://localhost:8080 { | |
startup php.cmd & | |
fastcgi / 127.0.0.1:9123 php | |
} |