Skip to content

Instantly share code, notes, and snippets.

View musoftware's full-sized avatar
🌏
Working from home

Musoftware musoftware

🌏
Working from home
View GitHub Profile
@musoftware
musoftware / file.json
Created January 13, 2024 11:06
Country ISO json
{
AF: "Afghanistan",
AX: "\xc5land Islands",
AL: "Albania",
DZ: "Algeria",
AS: "American Samoa",
AD: "Andorra",
AO: "Angola",
AI: "Anguilla",
AQ: "Antarctica",
@musoftware
musoftware / likeyoutubeID.php
Created November 10, 2016 09:41 — forked from rastislavcore/likeyoutubeID.php
PHP Convert Long Number to short string
<?php
/**
* Translates a number to a short alhanumeric version
*
* Translated any number up to 9007199254740992
* to a shorter version in letters e.g.:
* 9007199254740989 --> PpQXn7COf
*
* specifiying the second argument true, it will
* translate back e.g.:
@musoftware
musoftware / php72.bat
Created April 7, 2023 01:30
PHP Version with just Batch File to Access directly without Change Enviroment
@echo off
if "%1"=="" (
echo No arguments provided.
exit /b
)
set args=%*
C:/tools/php72/php.exe %args%
1 : Shutdown or Quit your XAMPP server from Xampp control panel.
2 : Download the ZIP version of MariaDB
3 : Rename the xampp/mysql folder to mysql_old.
4 : Unzip or Extract the contents of the MariaDB ZIP file into your XAMPP folder.
5 : Rename the MariaDB folder, called something like mariadb-5.5.37-win32, to mysql.
6 : Rename xampp/mysql/data to data_old.
7 : Copy the xampp/mysql_old/data folder to xampp/mysql/.
8 : Copy the xampp/mysql_old/backup folder to xampp/mysql/.
9 : Copy the xampp/mysql_old/scripts folder to xampp/mysql/.
@musoftware
musoftware / my.cnf
Created March 4, 2023 17:57
mysql configuration
# * Fine Tuning
key_buffer = 64M
max_allowed_packet = 128M
thread_cache_size = 30
myisam-recover = BACKUP
max_connections = 150
table_open_cache = 2048
thread_concurrency = 10
wait_timeout = 600
@musoftware
musoftware / test.md
Last active November 22, 2022 22:07
180+ Sample Test Cases for Testing Web and Desktop Applications

#This is a testing checklist for web and desktop applications.

Make testing checklist as an integral part of test cases writing process. Using this checklist you can easily create hundreds of test cases for testing web or desktop applications. These are all general test cases and should be applicable for almost all kind of applications. Refer these tests while writing test cases for your project and I’m sure you will cover most testing types except the application specific business rules provided in your SRS documents.

Though this is a common checklist, I recommend preparing a standard testing checklist tailored to your specific needs using below test cases in addition with application specific tests.

###Importance of Using Checklist for Testing: – Maintaining a standard repository of reusable test cases for your application will ensure the most common bugs will be caught more quickly. – Checklist helps to quickly complete writing test cases for new versions of the application. – Reusing test cases help to

@musoftware
musoftware / avoidhang.cs
Created October 25, 2022 11:23
New Avoid Hang
internal class AvoidHang : IDisposable
{
private readonly SemaphoreSlim _semaphore = new System.Threading.SemaphoreSlim(1, 1);
Stopwatch stopwatch = new Stopwatch();
bool _started = true;
public AvoidHang(int fast = 1000)
{
stopwatch.Start();
(new Thread(() =>
@musoftware
musoftware / thread_semaphore.cs
Created October 7, 2022 22:12
Sequence Thread Starting and wait
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApp1
{
internal class Program
@musoftware
musoftware / status.php
Created September 20, 2022 16:08
woo-commerce Status
Array
(
[wc-pending] => Pending payment
[wc-processing] => Processing
[wc-on-hold] => On hold
[wc-completed] => Completed
[wc-cancelled] => Cancelled
[wc-refunded] => Refunded
[wc-failed] => Failed
[wc-checkout-draft] => Draft
@musoftware
musoftware / countries.blade.php
Created June 30, 2022 12:20
Laravel Country List
<select id="country" name="country" class="form-control {{ $errors->has('country') ? 'is-invalid' : '' }}" class="form-control">
<option value="Afghanistan" {{ old('country' == "Afghanistan") ? 'selected' : '' }}>Afghanistan</option>
<option value="Åland Islands" {{ old('country' == "Åland Islands") ? 'selected' : '' }}>Åland Islands</option>
<option value="Albania" {{ old('country' == "Albania") ? 'selected' : '' }}>Albania</option>
<option value="Algeria" {{ old('country' == "Algeria") ? 'selected' : '' }}>Algeria</option>
<option value="American Samoa" {{ old('country' == "American Samoa") ? 'selected' : '' }}>American Samoa</option>
<option value="Andorra" {{ old('country' == "Andorra") ? 'selected' : '' }}>Andorra</option>
<option value="Angola" {{ old('country' == "Angola") ? 'selected' : '' }}>Angola</option>
<option value="Anguilla" {{ old('country' == "Anguilla") ? 'selected' : '' }}>Anguilla</option>
<option value="Antarctica" {{ old('country' == "Antarctica") ? 'selected' : '' }}>Antarctica</option