Skip to content

Instantly share code, notes, and snippets.

@GreyCat
GreyCat / BenchmarkMidi.scala
Created October 26, 2016 08:29
Benchmark FastParse + MidiParse
import java.nio.file.{Files, Paths}
import fastparse.byte.Midi.MidiData.Controller
import fastparse.byte.Midi.MidiEvent
import fastparse.byte.MidiParse
import scodec.bits.ByteVector
import java.text.DecimalFormat
import java.text.DecimalFormatSymbols
import java.util.Locale
{
"chunks": [
{
"body": {
"chunks": [
{
"body": {
"version": 700
},
"len": 2,
chunks:
- body:
chunks:
- body:
version: 700
len: 2
tag: tags_vrsn
- body:
foo1: 8
foo2: 40
<?xml version="1.0" encoding="UTF-8"?>
<hash>
<chunks type="array">
<chunk>
<body>
<chunks type="array">
<chunk>
<body>
<version type="integer">700</version>
</body>
{
"blocks": [
{
"block_type": "block_type_extension",
"body": {
"body": {
"application_id": {
"bytes": "4E 45 54 53 43 41 50 45 32 2E 30",
"num_bytes": 11
},
<?xml version="1.0" encoding="UTF-8"?>
<hash>
<blocks type="array">
<block>
<block-type>block_type_extension</block-type>
<body>
<body>
<application-id>
<bytes>4E 45 54 53 43 41 50 45 32 2E 30</bytes>
<num-bytes type="integer">11</num-bytes>
blocks:
- block_type: block_type_extension
body:
body:
application_id:
bytes: 4E 45 54 53 43 41 50 45 32 2E 30
num_bytes: 11
subblocks:
- bytes: 01 00 00
num_bytes: 3
@GreyCat
GreyCat / Dockerfile
Created April 20, 2019 01:25
Dockerfile for web IDE
# To build: `docker build --tag webide .`
# To run: `docker run --rm -p 4444:4444 webide:latest`
FROM node:lts-stretch
COPY . /webide
WORKDIR /webide
RUN apt-get update && apt-get install -y python-ruamel.yaml

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@GreyCat
GreyCat / check-release.rb
Created October 30, 2020 01:03
A quick way to validate current state of official builds / release deployments
#!/usr/bin/env ruby
require 'fileutils'
require 'rexml/document'
require 'json'
require 'date'
class VersionInfo
attr_accessor :version
attr_accessor :date