Skip to content

Instantly share code, notes, and snippets.

Using Batocera for a Visual Pinball Cabinet

Disclaimer

The multi-monitor support information below is based on personal experimentation and is not supported by the Batocera team. Please do not contact them for assistance with this setup.

Initial Setup

  1. Download the latest Batocera beta at: https://mirrors.o2switch.fr/batocera/x86_64/beta/last/
@Aldaviva
Aldaviva / wmp_h.265_hevc.md
Last active April 25, 2024 11:17
Play H.265/HEVC videos in Windows Media Player (Classic) without a third-party codec pack or media player. Tested using Microsoft.HEVCVideoExtension_2.0.60091.0_x64__8wekyb3d8bbwe with WMP 12.0.20348.1311 on Windows Server 2022 21H2 and 12.0.22621.1105 on Windows 11 22H2.

Download

  1. Go to https://store.rg-adguard.net.
  2. Search for the HEVC Video Extensions from Device Manufacturer (Microsoft.HEVCVideoExtension) app by entering the following store URL.
    https://www.microsoft.com/en-us/p/hevc-video-extensions-from-device-manufacturer/9n4wgh0z6vhq
    
    • Do not use the normal HEVC Video Extensions app URL, because that can't play HEVC videos in Windows Media Player for some inscrutable reason.
  3. Download the x64 appx file, or whatever your Windows architecture is.
    • You may have to right click › Save Link As because the URL scheme is http, not https, if your browser is set to enforce HTTPS-only mode.
  • If it tries to save as a filename that's just a GUID, you may copy the correct .appx filename and save it as that instead.
@emisjerry
emisjerry / translate.ahk
Created January 23, 2021 06:14
讀取英文單字後由線上字典網站讀取資料,並解析內容萃取資訊,再產生成Markdown文字,再下載語音檔到本地
;; AHK#41 translate
;; 輸入:選取文字
;; 輸出:c:\temp\translate.md, c:\temp\(選取文字).mp3
;; UI:彈出翻譯後的對話窗
#SingleInstance Force
#include d:\util\AHK\WinClipAPI.ahk
#include d:\util\AHK\WinClip.ahk
global sOutputFilename
@dgjustice
dgjustice / main.go
Created February 28, 2023 00:44
Connect to Arista device with crypto/ssh in Go.
import (
"bytes"
"fmt"
"log"
"net"
"os"
"golang.org/x/crypto/ssh"
)
@insertish
insertish / .bashrc
Last active April 25, 2024 11:05
Ubuntu 20.04 + ROS Noetic + TIAGo
# ROS Noetic + TIAGo workspace
source /opt/ros/noetic/setup.bash
source /home/ubuntu/tiago_public_ws/devel/setup.bash
# Try to determine appropriate ROS_IP based on network interfaces
export ROS_IP=$(ip addr | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p' | head -n 1)
echo ROS_IP set to $ROS_IP
# Switch to and configure LASR workspace
alias lasr="cd /media/ubuntu/c26792b8-9486-4e51-8b3d-b8577a6bbf28/lasr_ws && source devel/setup.bash"
@maximebories
maximebories / convert.md
Created March 30, 2023 20:04
FFmpeg command to convert webm to mp4 video files
ffmpeg -i input.webm -c:v libx264 -preset slow -crf 22 -c:a aac -b:a 128k output.mp4

This ffmpeg command converts a .webm video file to a standard .mp4 file using the libx264 codec for video, aac codec for audio, and a CRF value of 22. The preset is set to 'slow' for higher quality encoding, and the audio bitrate is set to 128 kbps.

@uchagani
uchagani / proxmox_usb_passthrough.md
Last active April 25, 2024 11:05
Proxmox USB Passthrough
@abaksy
abaksy / ohmyzsh-agnoster-conda.md
Last active April 25, 2024 11:04
Displaying virtualenv and conda information on the Oh-My-Zsh Agnoster theme
  • Add the virtualenv plugin in the ~/.zshrc file. This is done by modifying the plugins line to include the virtualenv plugin
  • Make sure the following lines are in the file ~/.oh-my-zsh/plugins/virtualenv/virtualenv.plugin.zsh
# disables prompt mangling in virtual_env/bin/activate
export VIRTUAL_ENV_DISABLE_PROMPT=1

#Disable conda prompt changes
#https://conda.io/docs/user-guide/configuration/use-condarc.html#change-command-prompt-changeps1
#changeps1: False
`conda config --set changeps1 false`
@intaxwashere
intaxwashere / YourProjectEditorModule.cpp
Last active April 25, 2024 11:01
Automatically adding category sections to editor
// add this code to your StartupModule() function of your EDITOR module
// if it doesnt work, try setting loading phase to "postdefault" -- no idea if this will produce side effects though.
// basically idea is looping all CDOs (i.e. UClasses) and their properties, getting their "category" meta value and registering them to
// property sections
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
static constexpr bool bAddSubcategories = false; // you probably want this to be false
auto ProcessCategory = [&PropertyModule](const FName ClassName, const FString& Category)
@tomvon
tomvon / resize-image-keep-aspect-ratio.py
Created June 8, 2014 22:59
Python script to resize an image while keeping the original aspect ratio.
#Resizes an image and keeps aspect ratio. Set mywidth to the desired with in pixels.
import PIL
from PIL import Image
mywidth = 300
img = Image.open('someimage.jpg')
wpercent = (mywidth/float(img.size[0]))
hsize = int((float(img.size[1])*float(wpercent)))