This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n=1; for file in *.jpg; do mv "$file" $(printf "%02d.jpg" $n); n=$((n + 1)); done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name '*.jpg' -exec sh -c 'convert "$0" -crop 50%x100% +repage +adjoin "${0%.jpg}_%d.jpg"' {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmd /v:on /c "set i=0 & for %f in (*.jpg) do (set /a i+=1 & set "num=00!i!" & set "num=!num:~-2!" & ren "%f" "!num!.jpg")" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.galleryAlt { | |
.gallery-grid { | |
display: flex; | |
justify-content: center; | |
flex-wrap: wrap; | |
gap: 25px; | |
.gallery-grid__row { | |
display: flex; | |
flex-basis: calc(calc(100% / 3) - calc(50px / 3)); | |
margin-bottom: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem -Directory | ForEach-Object { | |
$Folder = $_ | |
$i = 1 | |
Get-ChildItem $Folder -File | ForEach-Object { | |
$NewName = "{0:D2}.jpg" -f $i++ | |
# Check if the file is already named correctly | |
if ($_.Name -ne $NewName) { | |
$NewPath = Join-Path $Folder.FullName $NewName | |
# Check if a file with the new name already exists to avoid overwriting | |
if (-Not (Test-Path $NewPath)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
option[value=$#]*>{$#} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import glob | |
# Replace this with your directory path | |
base_directory = "./body/corrective-body-contouring/" | |
# Loop through each folder in the directory | |
for folder in os.listdir(base_directory): | |
folder_path = os.path.join(base_directory, folder) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define the path to the root of your PHP projects | |
$rootPath = "./" | |
# Define the file pattern to search for | |
$filePattern = "*.php" | |
# Function to fix the SEO title in a file | |
function Fix-SeoTitle { | |
param ( | |
[string]$filePath |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
# Specify the directory you want to search in | |
directory_path = "./" | |
# Function to list all folders in a directory | |
def list_folders(directory): | |
folder_list = [] | |
for root, dirs, files in os.walk(directory): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get the list of directories in the current folder | |
$directories = Get-ChildItem -Directory | Sort-Object Name | |
# Temporary name for renaming | |
$tempName = "tempDir" | |
# Rename directories to temporary names in reverse order | |
for ($i = 0; $i -lt $directories.Count; $i++) { | |
$newName = "{0:D2}" -f ($directories.Count - $i) | |
Rename-Item $directories[$i].Name $tempName$newName |
NewerOlder