Skip to content

Instantly share code, notes, and snippets.

View greguz's full-sized avatar
🎸
Let's Rock!

Giacomo Gregoletto greguz

🎸
Let's Rock!
View GitHub Profile
@greguz
greguz / split-xiso.sh
Last active March 13, 2023 08:59
Split Xbox ISO files when necessary, also build its attach.xbe
#!/bin/bash
set -e
isoDir="$1"
if ! [ -d "$isoDir" ];
then
echo "$isoDir not a dir"
exit 1
fi
@greguz
greguz / stream_parse_xml.js
Last active March 10, 2023 10:33
Node.js XML to objects streaming edition (htmlparser2)
import { Parser } from 'htmlparser2'
import { Transform } from 'stream'
import _ from 'lodash'
export default class XmlParser extends Transform {
constructor (path = [], options = {}) {
super({
...options,
objectMode: true
})