Skip to content

Instantly share code, notes, and snippets.

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",
import grails.compiler.GrailsCompileStatic
import groovy.transform.SelfType
import grails.artefact.Controller
import org.springframework.http.HttpStatus
import static org.springframework.http.HttpStatus.*
@SelfType(Controller)
trait ResponseTrait {
09:29:54: Executing task 'bootRun'...
Connected to the target VM, address: '127.0.0.1:54374', transport: 'socket'
> Task :server:compileJava NO-SOURCE
> Task :server:compileGroovy
> Task :server:buildProperties UP-TO-DATE
> Task :server:processResources
> Task :server:classes
> Task :server:findMainClass
Connected to the VM started by ':server:bootRun' (localhost:54387). Open the debugger session tab