Skip to content

Instantly share code, notes, and snippets.

View patelnwd's full-sized avatar
🏠
Working from home

Mukesh Patel patelnwd

🏠
Working from home
View GitHub Profile
@patelnwd
patelnwd / PascalSnakeCase.ps1
Created June 9, 2023 05:24 — forked from awakecoding/PascalSnakeCase.ps1
PowerShell ConvertTo-PascalCase, ConvertTo-SnakeCase
function ConvertTo-PascalCase
{
[OutputType('System.String')]
param(
[Parameter(Position=0)]
[string] $Value
)
# https://devblogs.microsoft.com/oldnewthing/20190909-00/?p=102844
return [regex]::replace($Value.ToLower(), '(^|_)(.)', { $args[0].Groups[2].Value.ToUpper()})
@patelnwd
patelnwd / delete_older_than.php
Created June 1, 2021 15:49 — forked from tdebatty/delete_older_than.php
A simple PHP function to delete files older than a given age. Very handy to rotate backup or log files, for example...
<?php
/**
* A simple function that uses mtime to delete files older than a given age (in seconds)
* Very handy to rotate backup or log files, for example...
*
* $dir String whhere the files are
* $max_age Int in seconds
* return String[] the list of deleted files
*/
@patelnwd
patelnwd / my.ini
Created May 14, 2021 01:21 — forked from hanjong/my.ini
my.ini for mySQL
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options