Skip to content

Instantly share code, notes, and snippets.

@nikbabchenko
nikbabchenko / kill.bash
Created March 23, 2020 11:13
Kill process
➜ ~ sudo lsof -i :8001
➜ ~ sudo kill -9 83413
@nikbabchenko
nikbabchenko / bash
Created March 19, 2020 07:39
Remove all docker images
docker image prune --all
@nikbabchenko
nikbabchenko / docker build.sh
Last active May 14, 2024 03:19
docker mongo
docker build -t nx-cloud-server .
build with the version:
docker build -t nx-cloud-server:0.1 .
@nikbabchenko
nikbabchenko / prometheus.sh
Last active January 14, 2020 11:33
Prometheus getting started
# Add packages to .net app
dotnet add package prometheus-net # install prometheus nuget pckg
dotnet add package prometheus-net.AspNetCore
kubectl create -f prometheus-config.yaml
kubectl create -f prometheus-pushgateway-map.yaml
helm install my-prometheus stable/prometheus
--set server.service.type=LoadBalancer --set rbac.create=false
helm install my-prometheus stable/prometheus
--set server.service.type=LoadBalancer --set rbac.create=false
-f prometheus.values.yaml
# add graphana
# build from dockerfile
docker build -t app-name .
# create custom registry
docker create -p 5000:5000 --restart always --name registry registry:2
# start custom registry
docker start registry
# add tag
@nikbabchenko
nikbabchenko / runmongo.sh
Created December 28, 2019 11:27
Run mongo
docker run -d -p 27017:27017 -v ~/data:/data/db mongo
@nikbabchenko
nikbabchenko / added-firebase.ts
Last active December 24, 2019 12:56
Course Work
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AngularFireModule } from 'angularfire2';
import { AngularFireAuthModule } from 'angularfire2/auth';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { CoreModule } from './core/core.module';
import { SharedModule } from './shared/shared.module';
import { HomeComponent } from './components/home/home.component';
const routes: Routes = [
{
path: '',
component: HomeComponent,
pathMatch: 'full'
},
{
path: 'passwords',
loadChildren: () => import('./passwords/passwords.module').then(m => m.PasswordsModule),
canLoad: [AuthGuard],
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [
{
path: 'passwords',
loadChildren: () => import('./passwords/passwords.module').then(m => m.PasswordsModule) // adds lazy module to routing
}
];