Skip to content

Instantly share code, notes, and snippets.

@dalbothek
dalbothek / connect-camera.user.js
Created December 16, 2023 15:30 — forked from r3Fuze/connect-camera.user.js
Prusa Connect Live Camera
// ==UserScript==
// @name Prusa Connect - Custom Live Camera Feed
// @namespace https://r3fuze.github.io
// @match https://connect.prusa3d.com/printer*
// @run-at document-idle
// @grant none
// @version 0.4.0
// @author fz
// @description Replace the slow camera snapshots in Prusa Connect with a custom live camera feed by using a Raspberry Pi running μStreamer.
// ==/UserScript==
@dalbothek
dalbothek / Bot.java
Created July 19, 2012 10:15 — forked from md-5/Bot.java
REl move code
/**
* Moves the specified amount forwards and left in the current direction
* (calculated based on current yaw)
*
* @param forward, double sideways how far to move
* @param left how far to the left to move
*/
public void moveRelative(double forward, double left) {
final float yaw = getLocation().getYaw();
final double xToMove = - forward * Math.sin(yaw) + left * Math.cos(yaw);
@dalbothek
dalbothek / phpmcinfo.php
Created September 14, 2011 09:47 — forked from zerotri/phpmcinfo.php
PHP Minecraft Info Query
<?php
class Socket
{
private $sock;
public function __construct()
{
$this->sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if(!$this->sock)
throw new Exception("Socket.create() failed; reason: " . socket_strerror(socket_last_error($this->sock)) . "\n");