Skip to content

Instantly share code, notes, and snippets.

View anytizer's full-sized avatar

Bimal Poudel anytizer

  • Canada
View GitHub Profile
@anytizer
anytizer / routes-scanner.py
Last active November 12, 2023 17:47
Routes scanner for Angular
import glob
import mariadb
import sys
# Semi automated - routing file generator for Angular
#
# Usage:
# pythoh routes-scanner.py > app-routing.module.ts
fourzerofour_handler = "front/front-pagenotfound"
@anytizer
anytizer / SamplesScanner.h
Created June 12, 2023 23:20
SamplesScanner
#pragma once
/**
* Purpose: Deep scan directories for a search pattern in known file extensions.
*
* Usage:
*
* SamplesScanner sc = SamplesScanner();
* QString path = "D:\\lmms\\build\\Debug\\data\\samples";
* QString pattern = "*.ds";
@anytizer
anytizer / api.service.ts.md
Last active December 1, 2023 07:23
Making an API Client Consumer Website in Angular

api.service.ts

import { Injectable } from '@angular/core';
import { CookieService } from 'ngx-cookie-service';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs';
import { IDValueDTO } from './dtos';

@Injectable({
@anytizer
anytizer / disk-usage-while-compiling-lmms.md
Last active June 5, 2023 18:50
Compiling 64bit LMMS under Windows with Visual Studio

Disk Usage while compiling LMMS

Project Size Notes
vcpkg x64, x86 7.5 GB My statistics includes packages unessential to LMMS as well
AppData/Local/vcpkg 840 MB Archives
LMMS Sources + .git 500 MB Including submodules
LMMS/build 5 GB created after compilation
LMMS/target < 1 GB created after compilation
LMMS packaging
import { ActivatedRoute } from '@angular/router';
constructor(private activatedRoute: ActivatedRoute) {}
ngOnInit(){
const id = this.activatedRoute.snapshot.paramMap.get('id');
}
@anytizer
anytizer / login.html
Last active October 20, 2022 19:19
Login form with [(ngModel)]
<form name="login">
<p>
<label>Username</label>
<input class="w3-input" type="text" name="username" [(ngModel)]="login.username" placeholder="Username" />
</p>
<p>
<label>Password</label>
<input class="w3-input" type="text" name="password" [(ngModel)]="login.password" placeholder="Password" />
@anytizer
anytizer / routes.ts
Last active November 7, 2022 00:26
Angular Routes with path match and default match
const routes: Routes = [
{path: '', redirectTo: "home", pathMatch:"full"},
{path: 'home', component: HomeComponent, title: ''},
{path: 'dashboard', component: DashboardComponent, title: ''},
{path: 'login', component: LoginComponent, title: ''},
{path: 'logout', component: LogoutComponent, title: ''},
{path: '**', component: PagenotfoundComponent, title: ''},
];
@anytizer
anytizer / ApiService.ts
Last active December 14, 2022 19:33
Angular HTML Range Slider - Two way binding
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { CredentialsDTO, EndpointDTO, NameValueDTO } from './objects';
@Injectable({
providedIn: 'root'
})
export class ApiService {
private _gateway = "https://localhost:5001";
@anytizer
anytizer / signup.html
Created November 15, 2021 05:29
Angular Signup Form with validations
<div class="w3-container w3-blue">
<h2>Signup</h2>
</div>
<form (ngSubmit)="onSubmit()" class="w3-container">
<div>
<p>Full Name</p>
<input [(ngModel)]="application.fullname" name="fullname" #fullname="ngModel" class="w3-input w3-leftbar w3-border w3-border-blue" type="text" required minlength="5" [placeholder]="application.fullname" _placeholde="John Doe" />
</div>
<div>
@anytizer
anytizer / ConfigurationsController.cs
Last active March 20, 2022 20:06
Angular CORS enabled web api server in C# .net 6
using dtos;
using Microsoft.AspNetCore.Mvc;
namespace web.api
{
[Route("api/[controller]")]
[ApiController]
public class ConfigurationsController : ControllerBase
{
[HttpGet]