Skip to content

Instantly share code, notes, and snippets.

View abalad's full-sized avatar
🏠
Working from home

Maicon Wagner abalad

🏠
Working from home
View GitHub Profile
@eneajaho
eneajaho / config.md
Last active July 6, 2024 01:25
Angular ESLint & Prettier Configuration

Install Angular ESLint

ng add @angular-eslint/schematics

Install Prettier and Prettier-ESLint dependencies

npm install prettier prettier-eslint eslint-config-prettier eslint-plugin-prettier --save-dev

ESLint configuration

Filename: .eslintrc.json

@rayonhunte
rayonhunte / admin.component.html
Last active February 8, 2020 11:24
Angular6 NGXS, search filter
<div class="container">
<form class="from col-auto" #s="ngForm">
<div class="form-row align-items-center">
<div class="col-auto">
<label class="sr-only" for="inlineFormInput">Name</label>
<input type="text" class="form-control mb-2"
name="username" ngModel placeholder="User Name">
</div>
<div class="col-auto">
<input type="date" class="form-control mb-2" name="date" ngModel>
@remojansen
remojansen / class_decorator.ts
Last active September 14, 2023 14:54
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@yvele
yvele / get-npm-package-version.sh
Last active April 27, 2024 04:19
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g' \
| tr -d '[[:space:]]')
echo $PACKAGE_VERSION