Skip to content

Instantly share code, notes, and snippets.

View rhaleblian's full-sized avatar

Ray Haleblian rhaleblian

View GitHub Profile

There are two approaches: cross-compiling and direct use. Everybody does the first but Ray is trying the second because the cross-compiler barfs on some HAL libraries and dammit if we were not going to use the OS we would just have a microcontroller.

Approach B: Direct Use

Have more than a GB of free space. I put /root on an SD.

Install Rust using https://rustup.rs .

Create a crate:

[General]
vid_renderer = qt_opengl3
video_fullscreen_scale = 3
[Machine]
machine = tc430hx
cpu_family = pentium_p54c
cpu_speed = 166666666
cpu_multi = 2.5
cpu_use_dynarec = 1
@rhaleblian
rhaleblian / gist:5f490047a983f01188b717b2049e40ad
Created April 10, 2022 15:27
86box-apple-silicon-build.sh
cmake -B build -S . --toolchain "./cmake/llvm-macos-aarch64.cmake" \
-D VNC=OFF -D NEW_DYNAREC=ON -D QT=ON -D USE_QT6=ON \
-D Qt6QCocoaIntegrationPlugin_DIR=/opt/homebrew/Cellar/qt/6.2.3_1/lib/cmake/Qt6Gui \
-D Qt6QMacStylePlugin_DIR=/opt/homebrew/Cellar/qt/6.2.3_1/lib/cmake/Qt6Widgets \
-D Qt6QICOPlugin_DIR=/opt/homebrew/Cellar/qt/6.2.3_1/lib/cmake/Qt6Gui \
-D Qt6QICNSPlugin_DIR=/opt/homebrew/Cellar/qt/6.2.3_1/lib/cmake/Qt6Gui \
--install-prefix /Users/$USER/Developer/86Box/build/src/ -DCMAKE_BUILD_TYPE=Release -G Ninja -DFAUDIO=ON
cmake --build build --target install && codesign --force --deep -s - ./build/src/86Box.app
@rhaleblian
rhaleblian / vmware-fusion-tech-preview-bad-kernel-week-install.md
Last active December 18, 2023 23:26
Installing Ubuntu Server in VMware Fusion Tech Preview during Bad Kernel Week
@rhaleblian
rhaleblian / rtl8188eu.sh
Last active March 8, 2022 12:41
install wifi kernel module for Edimax 7392:b811
# the Edimax WiFi dongle.
cd /usr/src
git clone https://github.com/lwfinger/rtl8188eu
mv rtl8188eu rtl8188eu-4.1.4
dkms add rtl8188eu/4.1.4
dkms build rtl8188eu/4.1.4
dkms install rtl8188eu/4.1.4
dkms status
@rhaleblian
rhaleblian / 2021-high-sierra-gotchas.md
Last active August 17, 2021 00:06
High Sierra gotchas, now that it's 2021

Homebrew no longer supports macFUSE

"... because it is no longer open source, as a result, it seems all formulae that depend on macFUSE are being disabled." You can still install sshfs via the homebrew-fuse tap:

brew install gromgit/fuse/sshfs

"Allow" button not working when System Software is blocked from loading

https://discussions.apple.com/thread/8229455

@rhaleblian
rhaleblian / rclone-to-arvixe.md
Last active January 19, 2021 13:14
rclone to arvixe

Install rclone.

rclone configure and make sure to allow insecure methods when it asks.

Let's say you called the configuration 'arvixe' and will put files at the path var/andy on Arvixe. To copy folder 'f' there:

rclone copy f arvixe:var/andy/f

That will make folder f on Arvixe.

@rhaleblian
rhaleblian / truth.py
Last active October 4, 2020 17:17
The Truth, the Whole Truth, and Nothing But the Truth.
import distutils.utils
def truth(s):
""" :return True|False|None: truth(iness) value.
:param object s: a value from os.environ.get().
"""
if s in (True, False, None):
return s
if isinstance(s, int):
if s > 0:
#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'Sphinx==1.1.3','console_scripts','sphinx-build'
__requires__ = 'Sphinx==1.1.3'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('Sphinx==1.1.3', 'console_scripts', 'sphinx-build')()
)
@rhaleblian
rhaleblian / test-pyserial.py
Last active May 15, 2020 14:34
Basic pyserial test.
import serial
ser = serial.Serial('/dev/ttyACM0') # open serial port
print(ser.name) # check which port was really used
buf = ser.read(6)
print buf
ser.close() # close port