Skip to content

Instantly share code, notes, and snippets.

View anytizer's full-sized avatar

Bimal Poudel anytizer

View GitHub Profile
@anytizer
anytizer / path.md
Created January 11, 2026 08:07
Qt Creator - Link with Qt

Qt Creator - Link with Qt: Qt Installation path example:

D:\Qt\Tools\sdktool\share\qtcreator
@anytizer
anytizer / resources-in-qt-app.cpp
Created January 4, 2026 22:55
List of resources embedded in a Qt application
// List of resources embedded in a Qt application
QDirIterator it(":", QDirIterator::Subdirectories);
while (it.hasNext())
{
QString dir = it.next();
qDebug() << dir;
// /icons/.
// /icons/logo.svg
// ...
@anytizer
anytizer / cursor-update.cpp
Created January 3, 2026 23:37
Update cursor while resizing...
// Determine the horizontal position
bool left = x <= MARGIN;
bool right = x >= w - MARGIN;
// Determine the vertical position
bool top = y <= MARGIN;
bool bottom = y >= h - MARGIN;
if (left && top) {
setCursor(Qt::SizeFDiagCursor); // Top-Left corner ( \ )
@anytizer
anytizer / randomize-patterns.cpp
Last active December 26, 2025 03:47
Various patches for LMMS like randomize() patterns, colors, etc.
// work in progress | help required
void PatternEditor::randomizePatterns()
{
TrackContainer::TrackList tl = model()->tracks();
// @todo Skip counting unsunpported tracks
int tracks = tl.size();
if(tracks>24)
{
@anytizer
anytizer / \app\Providers\AppServiceProvider.php
Created November 21, 2025 06:49
Laravel bootsrap attach a secondary sqlite database
```
use Illuminate\Support\Facades\DB;
...
public function boot(): void
{
DB::statement("ATTACH DATABASE '/path/database2.db' AS db2;");
}
```
@anytizer
anytizer / DebugController.cs
Last active November 13, 2025 10:53
Debug Listing of registered Web APIs
using Microsoft.AspNetCore.Mvc;
namespace web.Controllers
{
public class EndPointDTO
{
public string? name { get; set; }
public string? pattern { get; set; }
public List<string>? methods { get; set; }
}
@anytizer
anytizer / lmms-zyn.py
Last active October 26, 2025 03:23
LMMS ZynAddSubFx presets analysis
# Author: @anytizer, 2025-10-25
# Advanced usages:
# python lmms-zyn.py > lmms-zyn.csv
# Helps to analyze zynaddsubfx presets (compressed files)
# Compare with original release repo and LMMS Embedded Presets
import os
import hashlib
@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);