Skip to content

Instantly share code, notes, and snippets.

View salva-sm's full-sized avatar
🎯
Focusing

Salva salva-sm

🎯
Focusing
  • 3MT Global
  • A Coruña
View GitHub Profile
#!/bin/bash
# Configuration
INPUT_FILE="input.csv" # Name of your input CSV file
OUTPUT_FILE="output.xml" # Name of the output XML file
DELIMITER=";" # The field separator in the CSV
# The XML custom object type ID
CUSTOM_OBJECT_TYPE="guess_azureCountriesData"
@salva-sm
salva-sm / sfcc_inventory-pricebook_splitter.sh
Created April 14, 2025 11:18
Split SFCC Inventory/Pricebook into smallest one
#!/bin/bash
file="$1" # Input file as first argument
attrName="$2" # Element name (pricebooks or inventory-list) as second argument
outputDir="output"
if [ -z "$file" ] || [ -z "$attrName" ]; then
echo "Usage: $0 <input_file.xml> <pricebooks|inventory-list>"
exit 1
fi
@salva-sm
salva-sm / settings.json
Created June 16, 2022 18:38
VSCode settings
{
/* Global */
"editor.tabSize": 4,
"editor.formatOnSave": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"javascript.suggest.autoImports": false,
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.updateImportsOnFileMove.enabled": "always",
/* ESLint */
@salva-sm
salva-sm / working_week.js
Last active October 6, 2023 06:35
Automatic working week input script
const url = window.location.origin + '/timetracking/setTimeTracking';
const description = 'Description';
const ubication = '1'
const idProject = '11';
const daysWorked = [1,1,1,1,1];
const morning = { start: '8:00', end: '14:00' }
const afternoon = { start: '15:00', end: '17:30' } // Comment this line when continuous working days period
// Get current week monday ISO Format
var currentDate = new Date();