Skip to content

Instantly share code, notes, and snippets.

@erichelgeson
erichelgeson / install_ha_vb.sh
Last active August 25, 2024 14:44 — forked from Jelle-S/install_ha_vb.sh
Install Home Assistant on VirtualBox
# Installs Home Assistant on VirtualBox following https://www.home-assistant.io/installation/linux
# Install VirtualBox
sudo apt-get -y install virtualbox
# Remove KVM if installed:
sudo apt-get purge libvirt* kvm qemu*
# Create a new VM
VBoxManage createvm --name homeassistant --register
@erichelgeson
erichelgeson / install_ha_vb.sh
Created August 25, 2024 14:38 — forked from angus151/install_ha_vb.sh
Install Home Assistant on VirtualBox
# Installs Home Assistant on VirtualBox following https://www.home-assistant.io/installation/linux
# Install VirtualBox
sudo apt-get -y install virtualbox
# Create a new VM
VBoxManage createvm --name homeassistant --register
# Select OS type "Other Linux (64-bit)"
VBoxManage modifyvm homeassistant --ostype Linux_64
# Set RAM to 6GB (modify to your needs, TODO: make this an option, default value 2GB), video memory to 16MB (TODO: make this an option, default value 16MB)
VBoxManage modifyvm homeassistant --memory 6144 --vram 16
# 2 vCPUs (TODO: make this an option, default value 2)
void main() {
int i = 1;
return;
}
@erichelgeson
erichelgeson / disccopy42.key.yaml
Created January 12, 2023 00:37 — forked from andyzickler/disccopy42.key.yaml
Disk Copy 4.2 Kaitai
meta:
id: diskcopy42
file-extension: img
endian: be
bit-endian: be
doc-ref: https://web.archive.org/web/20201028142058/https://wiki.68kmla.org/DiskCopy_4.2_format_specification
seq:
- id: name
type: pstring
- id: padding

Assumes you're on a Mac or know what you're doing.

Extract driver, assumes location

$ dd if=HD0-someimage.hda of=./driver.img skip=64 count=32 bs=512

Calculate hash

$ md5 driver.img

FTDI chip and OS X 10.10 Hi All, Yesterday I got a FTDI (UART to USB) board from unknown manufacturer. I plugged in to the iMac and without a surprise, it was not working. I have tried all the possible combinations, but no luck. Then after some digging in Apple documentation and Google about kext, FTDI and related, I finally made it. Here are the steps:

  1. In order to disable the AppleUSBFTDI.kext extension (From Mac OS X 10.8 there is Apple driver implementation for the FTDI chip).

cd /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns sudo mv AppleUSBFTDI.kext AppleUSBFTDI.disabled

  1. Downloading and installing FTDI VCP Driver. I used the Mac OS X, 64 bit version.

Keybase proof

I hereby claim:

  • I am erichelgeson on github.
  • I am erichelgeson (https://keybase.io/erichelgeson) on keybase.
  • I have a public key ASCenHPwRyhqxn5IElYdVx3dUI-fQ98rH0FRc9vTWVnKsQo

To claim this, I am signing this object:

12:18:57: Executing task 'bootRun --stacktrace'...
:compileJava NO-SOURCE
:compileGroovy FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGroovy'.
> BUG! exception in phase 'semantic analysis' in source unit '/Users/erichelgeson/source/grails3mnclient/mnclientGrails3/src/main/groovy/clients/RecaptchaClient.groovy' null
@erichelgeson
erichelgeson / login.js
Created March 20, 2019 02:21
Using `fetch()` with ajaxAuth in Grails
const formData = new FormData()
formData.append('username', 'foo@bar.com');
formData.append('password', 'password');
const data = new URLSearchParams(formData);
fetch('/login/authenticate', {
method: "POST",
headers: {
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/x-www-form-urlencoded",