Skip to content

Instantly share code, notes, and snippets.

View pulsar256's full-sized avatar

Paul Rogalinski-Pinter pulsar256

  • 4screen
  • Munich
  • 01:57 (UTC +01:00)
View GitHub Profile
@pulsar256
pulsar256 / flash_skr1.3.sh
Created May 28, 2021 20:54
Flash klipper on a SKR1.3 wired direclty via serial to the RPI
#!/bin/bash
pin_reset=22
pin_boot=26
firmware=$HOME/klipper/out/klipper.bin
sudo systemctl stop klipper
# enter boot bootloader sequence
gpio mode $pin_reset OUT
import 'dart:async';
import 'dart:io';
import 'dart:math';
StreamController<int> controller = StreamController();
Future<void> main() async {
final paths = [for (var i = 0; i < 100; i++) "path $i"];
@pulsar256
pulsar256 / throttled_iterator.dart
Created October 7, 2020 08:53
throttled_iterator.dart
extension on Iterator {
void throttledForEach(int parallelFutures, ForEachCallback onData,
[ItemProcessedCallback onProgress]) async {
final semaphores = StreamController<int>();
while (parallelFutures-- > 0) {
semaphores.add(1);
}
await for (var _ in semaphores.stream) {
if (!moveNext()) break;
var f = onData(current)
@pulsar256
pulsar256 / opus-p2p-streaming.md
Last active January 29, 2024 01:19
Opus p2p Audio Streaming

Opus p2p streaming

Low latency streaming of ogg compressed audio data between two peers using RTP and gstreamer-1.0. Expected latency over the network is below 1 second.

Producer

The producer will provide a Jack sink which needs to be connected to a audio producer.

TARGET_PORT=5100
[stepper_x]
step_pin: P2.2
dir_pin: !P2.6
enable_pin: !P2.1
step_distance: .0125
endstop_pin: !P1.29 # P1.28 for X-max
position_endstop: 0
position_max: 320
homing_speed: 50
#!/bin/bash
# Flashes a LPC based boards over the serial line connected to the GPIO headers of a RPI.
# In addition to the TX/RX lines you will also need to connect the BOOT and RESET lines.
# This configuration uses GPIO6 for RESET and GPIO12 for BOOT. Pin numbering is using
# the wiring standard.
pin_reset=22
pin_boot=26
firmware=$HOME/klipper/out/klipper.bin
@pulsar256
pulsar256 / keybase.md
Created February 9, 2017 19:26
keybase.md

Keybase proof

I hereby claim:

  • I am pulsar256 on github.
  • I am pulsar256 (https://keybase.io/pulsar256) on keybase.
  • I have a public key ASDoiWMJgPQ0Y8iCyufEQAOE60AbS-o2TW2kM_rXafkYCQo

To claim this, I am signing this object:

$fn=200;
module tube(h, d, wall){
difference(){
cylinder(h=h, d=d);
translate([0,0,-1]) cylinder(h=h+2, d=d-wall);
}
}
module body(interlock, height, wall, od){
@pulsar256
pulsar256 / templated.java
Created October 11, 2016 16:16
Templated Links for spring-hateoas workaround
import org.apache.commons.lang.StringUtils;
import org.springframework.core.DefaultParameterNameDiscoverer;
import org.springframework.hateoas.Link;
import org.springframework.hateoas.UriTemplate;
import org.springframework.hateoas.mvc.ControllerLinkBuilder;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.util.UriComponentsBuilder;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
module pusteblume(radius=10, nupsies=40){
rotate_extrude(convexity=10) translate([radius, 0, 0]) circle(r=1, $fn=50);
for(i=[0:(360/nupsies):360-(360/nupsies)]) {
rotate([0,0,i]) translate([radius-2.2,0,0]) rotate([0,90,0]) cylinder(h=2,d1=0.5,d2=1.8,$fn=25);
}
}
difference() {
cylinder(h=2,d=8,$fn=100);
translate([0,0,-1]) cylinder(h=4,d=3.2,$fn=100);