Skip to content

Instantly share code, notes, and snippets.

@ReinisV
ReinisV / gist:d8d7e764849b721521729f6c098a5ed0
Last active December 27, 2020 16:51
autolinting for VSCode
the following json enables autofixing of linting issues when added to `settings.json` of VSCode:
```
{
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": [
{
"language": "vue",
@ReinisV
ReinisV / gist:7896a9a61f7c88f5215b12d26003bf34
Created December 27, 2020 16:50
to output webpack for Vue
// development
vue inspect > webpack-development-old.ts
// prod
vue inspect --mode production > webpack-production-old.ts
@ReinisV
ReinisV / ObservableBatchCollection.cs
Created June 2, 2017 08:05
An ObservableCollection which allows batch updates by differentiating between the handlers of CollectionChanged event, and giving the Reset type event only to CollectionViews
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq;
public class ObservableBatchCollection<T> : ObservableCollection<T>
{
// Flag used to prevent OnCollectionChanged from firing during a bulk operation like Add(IEnumerable<T>) and Clear()