Skip to content

Instantly share code, notes, and snippets.

View tscholze's full-sized avatar
💭
I may be slow to respond.

Tobias Scholze tscholze

💭
I may be slow to respond.
View GitHub Profile
@tscholze
tscholze / maui-de.md
Created December 31, 2024 08:33
Jame's MAUI Video translation

Title

Original:

My Mac Mini M4 Pro Developer Setup - .NET, macOS, iOS, Android, Windows, & More

Translated by direct meaning:

Mein Mac Mini M4 Pro Entwickler-Setup - .NET, macOS, iOS, Android, Windows, & More

Translated that it sounds natural:

Das ist mein Mac Mini M4 Pro Entwickler-Setup - .NET, macOS, iOS, Android, Windows, & More (91 chars)

@tscholze
tscholze / Mac-video-de.vtt
Created December 29, 2024 20:47
Rough but working German translation for Jame's Mac mini video
WEBVTT
NOTE
This file was generated by Descript <www.descript.com>
00:00:00.200 --> 00:00:05.480
Lasst uns über mein Mac-Entwickler
Setup auf meinem brandneuen Mac mini M4 Pro reden
00:00:05.670 --> 00:00:09.409
fun readPressure(): Double {
val temperature = readTemperature(asFinite = true)
val msb = device.read(REGISTER_MSB_PRESSURE, 1U).toInt()
val lsb = device.read(REGISTER_LSB_PRESSURE, 1U).toInt()
val xlsb = device.read(REGISTER_XLSB_PRESSURE, 1U).toInt()
val rawValue = (msb shl 12) + (lsb shl 4) + (xlsb shr 4)
var part1 = temperature / 2.0 - 64000.0
var part2 = part1 * part1 * calibration.pressure6 / 32768.0
part2 += part1 * calibration.pressure5 * 2
fun readPressure(): Double {
val temperature = readTemperature(asFinite = true)
val msb = device.read(REGISTER_MSB_PRESSURE, 1U).toInt()
val lsb = device.read(REGISTER_LSB_PRESSURE, 1U).toInt()
val xlsb = device.read(REGISTER_XLSB_PRESSURE, 1U).toInt()
val rawValue = (msb shl 12) + (lsb shl 4) + (xlsb shr 4)
var part1 = temperature / 2.0 - 64000.0
var part2 = part1 * part1 * calibration.pressure6 / 32768.0
part2 += part1 * calibration.pressure5 * 2
companion object {
/** I2C command bit mask */
private const val REGISTER_COMMAND = 0b10000000
/** I2C command to auto increment */
private const val REGISTER_COMMAND_AUTO_INC = 0b00100000
/** I2C address of the TCS3472. */
const val TCS3472_ADDRESS: UByte = 0x29U
@tscholze
tscholze / MainActivity.java
Created September 29, 2018 19:02
Trying to save an image from the Rasp Pi camera to a temp folder to ship it via an embedded web server - Step 1.
/**
Error:
E/AndroidRuntime: FATAL EXCEPTION: CameraThread
Process: xxxx, PID: 2634
java.lang.IllegalStateException: buffer has been freed
*/
private ImageReader.OnImageAvailableListener onImageAvailableListener = new ImageReader.OnImageAvailableListener()
{
@Override
@tscholze
tscholze / manifest.json
Created January 12, 2014 09:41
MG-Chrome-Extension
{
"name": "MobileGeeks Top 5",
"version": "0.1",
"manifest_version": 2,
"description": "Presents you the latest five article of mobilegeeks.de",
"homepage_url": "http://www.mobilegeeks.de",
"browser_action":
{
"default_icon": "icon48.png",
"default_popup": "popup.html"