Skip to content

Instantly share code, notes, and snippets.

View Ni55aN's full-sized avatar

Vitaliy Stoliarov Ni55aN

View GitHub Profile
@igogrek
igogrek / Vue code style.md
Last active April 11, 2021 06:58
Code style and application structure

Application structure

General

  1. Application has tree structure with folders for each "feature"
  2. Feature folders are named with lowerCamelCase → myComponentDashboard
  3. Feature can contain any number of components and nested features
  4. Components are named using UpperCamelCase → MyWidgetComponent.vue
  5. Component can have translation .yml file named correspondingly → MyWidgetComponent.yml
  6. If component requires more than 2 files: .vue and .yml file - folder is created with the same name → MyWidgetComponent
@nuclearglow
nuclearglow / convert-arraybuffer.js
Created January 26, 2018 10:30
ArrayBuffer <-> JSON <-> ArrayBuffer
// array buffer to JSON
const dataString JSON.stringify(Array.from(new Uint8Array(arrayBuffer)));
// send around
// JSON to ArrayBuffer
new Uint8Array(JSON.parse(dataString)).buffer