I hereby claim:
- I am hydrabolt on github.
- I am hydrabolt (https://keybase.io/hydrabolt) on keybase.
- I have a public key whose fingerprint is 7355 4FA4 E9CA 9D37 2735 CA0F 57FF CB08 F5A4 2963
To claim this, I am signing this object:
const fs = require('fs'); | |
const file = JSON.parse(fs.readFileSync('./dump.har')).log; | |
const targetMimeType = 'image/jpeg'; | |
let count = 1; | |
for (const entry of file.entries) { | |
if (entry.response.content.mimeType === targetMimeType) { | |
// ensure output directory exists before running! | |
fs.writeFileSync(`output/${count}.png`, new Buffer(entry.response.content.text, 'base64'), 'binary'); | |
count++; |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
apt-get update | |
apt-get install -y git libasound2-dev libavutil-dev libpcre3-dev libboost-dev | |
git clone https://github.com/popcornmix/omxplayer.git | |
cd omxplayer | |
./prepare-native-raspbian.sh | |
make ffmpeg | |
make -j$(nproc) | |
sudo make install |
You take a stream/buffer of binary data. The start of your data is a "Page", which has a header followed by data.
You need to read the following data from the header (see https://xiph.org/ogg/doc/framing.html for more detail)
capture_pattern
- bytes 0 to 3, must read OggSstream_structure_version
- byte 4, must be 0header_type_flag
- byte 5, a bitflag that tells you metadata about the page (is it a new packet? is a packet continued here? is it the first/last page of the stream?)absolute granule position
- bytes 6 to 13, not needed unless you want seekingstream serial number
- bytes 14 to 17, a serial number given to each stream contained in the Ogg file. This is important for playing Ogg files that contain other streams, such as video or cover art. You need to identify and only bother parsing the Opus stream.I hereby claim:
To claim this, I am signing this object:
'use strict'; | |
const { Transform } = require('stream'); | |
exports.Serialiser = class Serialiser extends Transform { | |
constructor(options) { | |
super({ writableObjectMode: true, ...options }); | |
} | |
_transform(chunk, encoding, callback) { |
Hello! I'm Amish (also known as hydrabolt), and I am the creator of discord.js.
I created discord.js as a hobby/learning project for myself in August 2015 while I was still a teenager in school.
More than 6 years later, discord.js has become more popular than I could ever imagine, and I cannot express how grateful I am to the other contributors and the community for this amazing experience.
A few of my favourite highlights include: