Skip to content

Instantly share code, notes, and snippets.

View r1d3rzz's full-sized avatar
💻
Working from home

MyintThwayKhine r1d3rzz

💻
Working from home
View GitHub Profile
@r1d3rzz
r1d3rzz / gist:48d4c54b58a8157e23438542fed593eb
Created August 11, 2025 14:46
Composer "Generating optimized autoload files" very slow
composer dump-autoload -o
@r1d3rzz
r1d3rzz / gist:0bdc0ce47b9e44a2b01f04556bac504c
Last active August 2, 2025 15:40
make unique row in mssql Example
use DB
go
ALTER TABLE Tbl_SysUserIssueCategory
ADD CONSTRAINT UQ_SysUser_IssueCategory UNIQUE (SysUserId, IssueCategoryId);
remove
=======
@r1d3rzz
r1d3rzz / gist:b5aeeae13c0c02052b599d34f13302a6
Created July 28, 2025 09:11
Set Next Start Auto Increment Id value in mssql
-- current id 1, 2, 3, 4 so reseed is 4 next is 5
DBCC CHECKIDENT ('Comment', RESEED, 4);
@r1d3rzz
r1d3rzz / gist:fafbf01e730a6eceaae9b45634fe73ef
Created July 27, 2025 07:57
install laravel qr code generator
composer require simplesoftwareio/simple-qrcode "~4" --with-all-dependencies
enable php.ini file => extension=gd
used in laravel blade file
{!! QrCode::size(250)->generate('mailto:[email protected]'); !!}
using TelegramBot.Helpers;
Console.WriteLine("Sending Start...");
DateTime startTime = DateTime.Now;
Console.Write("Type your Message: ");
string message = Console.ReadLine()!;
await TelegramBotHandler.SendTelegramMessage(message!);
DateTime endTime = DateTime.Now;
eg. string start = "20250101"
DateTime startDate = DateTime.ParseExact(start, "yyyyMMdd", CultureInfo.InvariantCulture);
@r1d3rzz
r1d3rzz / memoryLimiterrorNote.txt
Created April 22, 2025 03:11
Website (Wordpress) : fix error memory limit error
Note: change memory limit in : /home/smedb/public_html/wp-includes/default-constants.php
line 52: 40M to 256M
@r1d3rzz
r1d3rzz / getCurrentLocation.js
Created February 27, 2025 03:41
Get Current Location
if ("geolocation" in navigator) {
// Geolocation is supported
navigator.geolocation.getCurrentPosition(
(position) => {
// Success callback
const latitude = position.coords.latitude;
const longitude = position.coords.longitude;
console.log(`Latitude: ${latitude}, Longitude: ${longitude}`);
},
(error) => {
@r1d3rzz
r1d3rzz / checkClustered.sql
Last active December 9, 2024 06:10
check sql index Clustered
ALTER DATABASE test SET TRUSTWORTHY ON;
GO
SELECT
'CREATE INDEX ' + ix.name + ' ON ' + t.name + '(' + CAST(STRING_AGG(c.name, ', ') AS VARCHAR(MAX)) + ');' AS create_index_statement
FROM
sys.indexes ix
JOIN
sys.tables t ON ix.object_id = t.object_id
It looks like the `--use-database-names` option isn't being recognized in your `Scaffold-DbContext` command. This issue can sometimes occur due to the version of Entity Framework Core tools you're using or how the command is structured.
Here are a few steps to troubleshoot and resolve this:
1. **Ensure you have the latest version of EF Core tools**:
```powershell
dotnet tool update --global dotnet-ef
```
2. **Use the `dotnet ef` CLI command instead of the Package Manager Console**: