Skip to content

Instantly share code, notes, and snippets.

View LeoAdamek's full-sized avatar

Leo Adamek LeoAdamek

View GitHub Profile
@LeoAdamek
LeoAdamek / png.hexpat
Created November 1, 2021 10:36
PNG Pattern for ImHex
#pragma endian big
enum ChunkType : u32 {
// Critical Chunks (uppercase first char)
ImageHeader = 0x49484452, //"IHDR",
Palette = 0x504c5445, //"PLTE",
ImageData = 0x49444154, //"IDAT",
ImageEnd = 0x49454E44, //"IEND",
// Ancillery chunks (lowercase first char)
### Keybase proof
I hereby claim:
* I am LeoAdamek on github.
* I am leoadamek (https://keybase.io/leoadamek) on keybase.
* I have a public key whose fingerprint is 8F29 B88C 7E90 C7FB 8DBC CB6F E7E7 1C9E 6DFE A11E
To claim this, I am signing this object:
@LeoAdamek
LeoAdamek / keybase.md
Last active March 29, 2019 11:00
keybase.md

Keybase proof

I hereby claim:

  • I am LeoAdamek on github.
  • I am leoadamek (https://keybase.io/leoadamek) on keybase.
  • I have a public key whose fingerprint is 8F29 B88C 7E90 C7FB 8DBC CB6F E7E7 1C9E 6DFE A11E

To claim this, I am signing this object:

@LeoAdamek
LeoAdamek / down.mysql.sql
Created January 25, 2019 14:42
migrations
drop table if exists `users_organizations`;
drop table if exists `users_organizations`;
drop table if exists `users_collections`;
drop table if exists `collections`;
drop table if exists `organizations`;
drop table if exists `attachments`;
drop table if exists `ciphers`;
drop table if exists `folders`;
drop table if exists `devices`;
drop table if exists `users`;
syntax = 'proto3';
package common;
message EntityRef {
string type = 1;
string id = 2;
}
@LeoAdamek
LeoAdamek / error.el
Created September 14, 2017 13:27
Error when starting alchemy-mode
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
define-key((keymap) nil alchemist-phoenix-command-map)
byte-code("\302 \303 \304#\210)\207" [map alchemist-key-command-prefix make-sparse-keymap define-key alchemist-phoenix-command-map] 4)
(defvar alchemist-phoenix-mode-map (byte-code "\302 \303 \304#\210)\207" [map alchemist-key-command-prefix make-sparse-keymap define-key alchemist-phoenix-command-map] 4) ("/home/leo/.emacs.d/elpa/alchemist-20170803.414/alchemist-phoenix.elc" . 3135))
require(alchemist-phoenix)
eval-buffer(#<buffer *load*> nil "/home/leo/.emacs.d/elpa/alchemist-20170803.414/alchemist.el" nil t) ; Reading at buffer position 2686
load-with-code-conversion("/home/leo/.emacs.d/elpa/alchemist-20170803.414/alchemist.el" "/home/leo/.emacs.d/elpa/alchemist-20170803.414/alchemist.el" nil t)
autoload-do-load((autoload "alchemist" "Toggle alchemist mode.\n\nKey bindings:\n\\{alchemist-mode-map}\n\n(fn &optional ARG)" t nil) alchemist-mode)
command-execute(alchemist
#include <Audio.h>
#include <MIDI.h>
// Each concurrent note is assigned to a voice.
// The voice tracks which note is being played so
// when it is relased the correct voice can be stopped.
typedef struct {
// A pointer to the oscillator so it can be controlled.
AudioSynthWaveformSine* osc;
#include <Audio.h>
#include <MIDI.h>
typedef struct {
AudioSynthWaveformSine* osc;
byte note;
float freq;
float amp;
} Voice;
@LeoAdamek
LeoAdamek / synth.cpp
Created May 6, 2017 22:02
Polyphonic Synth
#include <Audio.h>
#include <MIDI.h>
typedef struct {
AudioSynthWaveformSine osc;
byte note;
float freq;
float amp;
AudioConnection w_lft;
AudioConnection w_rgt;
@LeoAdamek
LeoAdamek / sketch.cpp
Created May 6, 2017 18:22
usb audio synth thing
#include <Audio.h>
#include <MIDI.h>
AudioSynthWaveformSine debugTone;
AudioOutputUSB audioRet;
AudioConnection patchCord1 (debugTone, 0, audioRet, 0);
AudioConnection patchCord2 (debugTone, 0, audioRet, 1);
void setup() {
AudioMemory(15);