Skip to content

Instantly share code, notes, and snippets.

View anytizer's full-sized avatar

Bimal Poudel anytizer

View GitHub Profile
@anytizer
anytizer / gist:47155589b91399c82f0e676adf549d89
Created October 13, 2024 17:15
GIT over HTTP(s) DAV - Reference
# Creating a git Repo over HTTP(s)
It could be riskier to use git over http(s).
Use alternatives when possible.
Reference materials
- https://git-scm.com/docs/git-update-server-info.html
- https://git-scm.com/book/en/v2/Git-on-the-Server-Smart-HTTP
- https://web.mit.edu/git/www/howto/setup-git-server-over-http.html
@anytizer
anytizer / phpunit.xml
Last active September 22, 2024 06:36
phphunit.xml minimum settings
<phpunit bootstrap="bootstrap.php" colors="true">
<testsuites>
<testsuite name="unit">
<directory suffix="Test.php">cases</directory>
</testsuite>
</testsuites>
<logging>
<testdoxText outputFile="testdox.txt"/>
</logging>
</phpunit>
@anytizer
anytizer / lower.md
Created May 29, 2024 18:40
Lower cased API Endpoints in Program.cs

Lower cased API Endpoints in Program.cs

builder.Services.AddRouting(options => options.LowercaseUrls = true);
@anytizer
anytizer / sqlite3.cpp
Last active May 15, 2024 17:51 — forked from lotfio/sqlite3.cpp
c++ sqlite3 create table and insert example
// From: https://gist.github.com/lotfio/cfbf857bc96a0487b53ed4877658a97b
// Fork: https://gist.github.com/anytizer/44bdc76947b302f22c5c1b67a83d2627
/**
* Minor Improvements:
* Sqlite => DatabaseManager.
* One lined insert statements.
* Embedded SQLite3 source code from amalgamation.
* Access pointer with "this".
* OS/compiler specific full path to the database name.
@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 September 26, 2024 05:44
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 / Cross Compiling LMMS for Windows on Ubuntu.md
Last active May 4, 2024 05:49
Compiling 64bit LMMS under Windows with Visual Studio

Installing with msys

sudo apt install pacman
pacman --needed -S bash pacman pacman-mirrors msys2-runtime

mkdir build
cd build
../cmake/build_win64.sh
import { ActivatedRoute } from '@angular/router';
constructor(private activatedRoute: ActivatedRoute) {}
ngOnInit(){
const id = this.activatedRoute.snapshot.paramMap.get('id');
}
@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: ''},
];