Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@generalmimon
generalmimon / ks-serialization-notes.md
Last active December 29, 2022 19:21
Kaitai Struct — serialization

Kaitai Struct — serialization

Notes on individual features

  • fixed contents — mapped to a literal byte array (note: shouldn't it write magic1() instead? but then it would have to be checked again so that it doesn't violate consistency):

        public void _read() {
            this.magic1 = this._io.readBytes(6);

if (!(Arrays.equals(magic1(), new byte[] { 80, 65, 67, 75, 45, 49 }))) {

@christianparpart
christianparpart / terminal-synchronized-output.md
Last active April 5, 2024 23:07
Terminal Spec: Synchronized Output

Synchronized Output

Synchronized output is merely implementing the feature as inspired by iTerm2 synchronized output, except that it's not using the rare DCS but rather the well known SM ? and RM ?. iTerm2 has now also adopted to use the new syntax instead of using DCS.

Semantics

When rendering the screen of the terminal, the Emulator usually iterates through each visible grid cell and renders its current state. With applications updating the screen a at higher frequency this can cause tearing.

This mode attempts to mitigate that.

@generalmimon
generalmimon / github-collect-repos-using-ks.sh
Last active September 10, 2022 15:27
A shell script for collecting Kaitai Struct YAML (.ksy) file paths in GitHub repositories
#!/bin/sh -f
# SPDX-FileCopyrightText: 2021 Petr Pucil <petr.pucil@seznam.cz>
#
# SPDX-License-Identifier: MIT
# A shell script for collecting Kaitai Struct YAML (.ksy) file paths in GitHub repositories.
#
# Requires <https://stedolan.github.io/jq> and <https://curl.se> to work.
#
# Inspired by https://github.com/Alhadis/Harvester, but this script:
@generalmimon
generalmimon / github-repos-using-ks.md
Last active March 20, 2023 23:20
List of GitHub repositories containing .ksy files (excluding kaitai-io org)
  • Last updated: 2023-03-20

  • Collected .ksy files on GitHub by this shell script and then filtered unique repos by the following command:

meta:
id: cab
file-extension: cab
endian: le
license: CC0-1.0
doc-ref: http://download.microsoft.com/download/4/d/a/4da14f27-b4ef-4170-a6e6-5b1ef85b1baa/[ms-cab].pdf
seq:
- id: magic
contents: "MSCF"
@bindreams
bindreams / svstream.hpp
Last active March 30, 2024 12:08
string_view compatible std::istringstream.
/**
* MIT No Attribution
*
* Copyright 2020-2024 Anna Zhukova
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy, modify,
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so.
@robert
robert / policy.md
Created February 5, 2020 08:15
Wacom Experience Program Privacy Policy

Tablet Driver – Privacy Notice

This Privacy Notice is for the Tablet Driver Software ("Tablet Driver") provided by Wacom Co., Ltd. and its subsidiaries (collectively "Wacom Group"). This Privacy Notice applies to Your use of Tablet Driver. Please review this Privacy Notice before using Tablet Driver.

  1. Definitions 1.1. "Personal Data" means any information which – either alone or in combination with other information we can access – relates to You as an identified or identifiable individual. 1.2. “User” means an individual who uses the Tablet Driver. 1.3 "Wacom", "we", “our” or “us” means the relevant company in the Wacom Group responsible for processing your Personal Data. The list of Wacom Group companies can be found at https://www.wacom.com/about-wacom/our-passion/our-company
@kalpeshsingh
kalpeshsingh / pre-push
Last active February 15, 2024 02:00
A pre-push git hook that notify Amazon Chime group
#!/bin/sh
branch="$(git rev-parse --abbrev-ref HEAD)"
# get computer name to append in Chime message
username=$USER
# a branch name where you want to prevent git push. In this case, it's "master"
if [ "$branch" = "master" ]; then
echo "You can't commit directly to '"${branch}"' branch" # webstorm or intellij will show this as popup

capacitor tier list

first tier - japanese

  • Rubycon
  • United Chemi-Con (or Nippon Chemi-Con)
  • Nichicon
  • Sanyo/Suncon
  • Panasonic
  • Hitachi
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active March 12, 2024 22:46
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created