Skip to content

Instantly share code, notes, and snippets.

View splincode's full-sized avatar
💬
печатает...

Максим Иванов splincode

💬
печатает...
  • гпх
  • Архангельск, РФ
  • 18:33 (UTC +03:00)
  • Instagram splincode
View GitHub Profile
@splincode
splincode / repo-rinse.sh
Created July 31, 2023 14:17 — forked from nicktoumpelis/repo-rinse.sh
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive

Container is a replica of container, image is a blueprint

List container activitily

$ docker ps -a

List installed images

import { TestBed } from '@angular/core/testing';
export interface ZooStateModel {
feedAnimals: string[];
}
@StateRepository()
@State<ZooStateModel>({
name: 'zoo',
defaults: {
import { TestBed } from '@angular/core/testing';
export interface ZooStateModel {
feedAnimals: string[];
}
export class FeedAnimals {
public static type: string = '[FeedAnimals]: action';
constructor(public animalsToFeed: string[]) {}
}
export interface Course {
id: number;
description: string;
iconUrl?: string;
courseListIcon?: string;
longDescription?: string;
category: string;
seqNo: number;
lessonsCount?: number;
@StateRepository()
@State({
name: 'courses',
defaults: createEntityCollections()
})
@Injectable()
export class CoursesEntitiesState extends NgxsDataEntityCollectionsRepository<Course> {}
@StateRepository()
// novels.state.ts
@Persistence({
existingEngine: sessionStorage
})
@State<Novel[]>({
name: 'novels',
defaults: []
})
@Injectable()
export class NovelsState {}
// novels.state.ts
@State<Novel[]>({
name: 'novels',
defaults: []
})
@Injectable()
export class NovelsState {}
// detectives.state.ts
@State<Detective[]>({
@StateRepository()
@State({
name: 'counter',
defaults: 0
})
@Injectable()
class CounterState extends NgxsDataRepository<number>
implements NgxsDataDoCheck, NgxsDataAfterReset {
private subscription: Subscription;
@State({
name: 'counter',
defaults: 0
})
@Injectable()
class CounterState implements NgxsOnChanges, NgxsOnInit, NgxsAfterBootstrap {
public ngxsOnChanges(): void {
// ..
}