Skip to content

Instantly share code, notes, and snippets.

View obedmhg's full-sized avatar

Obed Murillo obedmhg

View GitHub Profile
@obedmhg
obedmhg / referencedProductsWithKey.json
Created May 31, 2023 22:58
referencedProductsWithKey.json
{
"type": "reference-set",
"name": "referencedProducts",
"value": [
{
"typeId": "product",
"key": "56485"
}
]
}
@obedmhg
obedmhg / referencedProducts.json
Created May 31, 2023 22:55
referencedProducts.json
{
"name": "referencedProducts",
"value": [
{
"typeId": "product",
"id": "97e98bde-083d-4556-a912-003385847e29"
}
]
}
// ==UserScript==
// @name Better IMPEX
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://impex.us-central1.gcp.commercetools.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=commercetools.com
// @require https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.js
// @grant none
@obedmhg
obedmhg / dash.dsh
Created November 15, 2021 05:16
Dash Commands
# Get Value
get /atg/commerce/order/OrderRepository.loggingDebug
# call Methods
call /atg/commerce/claimable/CouponBatchTools doStopService
call /atg/commerce/claimable/CouponBatchTools doStartService
# set property value
set /atg/commerce/endeca/cache/DimensionValueCacheTools.minimumCacheRefreshIntervalSecs 0
set /atg/commerce/endeca/cache/DimensionValueCacheTools.checkMDEXUpdated false
@obedmhg
obedmhg / smtpOnCloud.sh
Created February 23, 2021 00:07
Configure smtp on linux
#install sendemail
yum install sendmail
#configure email to allow send emails other than localhost
vi /etc/mail/sendmail.mc
# change from
#DAEMON_OPTIONS(`Port=smtp, Addr=127.0.0.1 Name=MTA’)dnl
# to
#DAEMON_OPTIONS(`Port=smtp, Name=MTA’)dnl
#open default smtp port on the firewall
@obedmhg
obedmhg / find_in_jar.sh
Created October 27, 2020 17:43
find_in_jar.sh
#!/bin/bash
#serch all jar files
for jar in $(find -name \*.jar); do
files=$(unzip -l $jar | grep -i '*\.[xml|properties]' | awk '{print $4}');
for file in $files; do
#check if the found file contains 'test.log'
@obedmhg
obedmhg / assets_count.sql
Last active April 15, 2020 19:15
Cursor that will get assets count for a particular project display name prefix
SET SERVEROUTPUT ON;
DECLARE
CURSOR c_get_project_id (p_display_name IN VARCHAR2) IS
SELECT project_id, display_name FROM atgpub.epub_project WHERE display_name LIKE p_display_name AND completion_date IS NOT NULL AND completion_date > sysdate - 5 ORDER BY completion_date DESC;
CURSOR c_get_count_assets ( p_project_id IN VARCHAR2 ) IS
SELECT COUNT(*) FROM (
WITH project_details AS
<!--Query by date -->
<query-items item-descriptor="sku-link" id-only="false">
creationDate > date("2018-01-01")
</query-items>
<!--Query with INCLUDES ITEM this checks on list of sg items -->
<query-items item-descriptor="order" id-only="false">
(state = "SUBMITTED") AND shippingGroups INCLUDES ITEM (status="SUBMITTED" AND itemType="Cloths")</query-items>
<!-- Query RANGE of items -->
@obedmhg
obedmhg / rebel-remote.xml
Created March 9, 2020 23:26
sample rebel-remote.xml file
<?xml version="1.0" encoding="UTF-8"?>
<rebel-remote xmlns="http://www.zeroturnaround.com/rebel/remote">
<id>MyProjectMyModule</id>
</rebel-remote>
@obedmhg
obedmhg / rebel.xml
Created March 9, 2020 23:24
sanple rebel.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
Refer to https://manuals.zeroturnaround.com/jrebel/standalone/config.html for more information.
-->
<application generated-by="eclipse" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_1.xsd">
<classpath>
<dir name="D:\\shared\\apps\\MyProject\\MyModule\\classes">