Skip to content

Instantly share code, notes, and snippets.

View danielmelogpi's full-sized avatar
🔬

Daniel Melo danielmelogpi

🔬
View GitHub Profile
@danielmelogpi
danielmelogpi / recalculate order perspective.sql
Created February 9, 2023 19:22
Recalculates order perspective
DO $$
DECLARE order_calc record;
begin
for order_calc in (
select o.id order_id, oi.vendor_id, oi.vendor_id,
sum(oi.price * oi.quantity) item_total,
sum(oi.coupon_total_discount) coupon_total_discount,
sum(oi.shipping_estimated_cost) shipping_estimated_cost,
sum(oi.price * oi.quantity) + sum(oi.shipping_estimated_cost) - sum(oi.coupon_total_discount) net_total
from order_header o
with first_variant_in_set as (
select * from product_detail where id in
(
select (array_agg(id))[1]
from
(
select id, product_id from product_detail
order by current_stock desc
)A
group by product_id
@danielmelogpi
danielmelogpi / README.md
Last active June 13, 2022 22:43 — forked from erichrobinson/README.md
SwitchResX Configuration - LG 21:9 UltraWide

#SwitchResX Settings for LG 21:9 UltraWide

SwitchResX is a utility that allows users to override the default resolution settings in OSX. For more information, including download links, vist http://www.madrau.com/ .

##Disabling System Integrity Protection (SIP)

If you are running OSX 10.11 or higher, SIP must be disabled. To disable SIP do the following:

  • Boot into the recovery partition by pressing CMD + R when starting up your Mac.
  • Once in recovery mode, open a terminal window.
  • Type the command csrutil disable
@danielmelogpi
danielmelogpi / rapha-pudim.txt
Created February 21, 2020 02:14
test-bitcoin-notary
1
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlblR5cGUiOiJDT01QQU5ZX1RPS0VOIiwiaWRjb21wYW55IjoiMTNhOWJkYmYtMGUzNC00NTdlLWFlNGYtMmJlMDA5YzBiNDFmIiwiaWF0IjoxNTIxNTY5MTQ5fQ.uuu9pXv1rF80wwQX39LCXTdeG6lDKLO4dZkXU8WJQo_IpRaPjqSNhCoyXTP7KH343md_r3ZnpoQG2KBGP8O1IEOfR-mE44VeuAgpaLnED2HSn8KTs3Xz9iPsUShBN9D4VYzeGmE288gkj8z8kiq-UYWM3FAKUdEBY-G5biaDH8BM8CQacUn-rtCDxJcG59LiDBf2yFLtzB6htDUbKrnFC_73RpitIY335mEFwt5L_FHCYEB5I4INPctcQO85alztgJBvSc587-YDI_iktVzG6kNot0bqBL-1CwY_kCATb6_bkAiWCJvk9iDhz4PmIxvW9Qvg5vLOwJLAfOAmVzNOKMjPeNsIU2ARwCfxH48VrSnIR4uZBXFcsmdnvdXivZBa-pcfUicZ3sgUVgFDpps0fMJ4bV3FGnhoqfErKEVltSe_SNiN5q3tAIoRPmhPqi_MBJnwQfGWDch7FE0ePzuHGrLq5zL2cnAmOXWuDIpBKIWfY3uOQtoMBUX-w3ZgCSUvqw5P8bNBU0Zh_1woyN0nG7jWIV-qUKJ9lmBznLU3sq7VEKRCtMktZdzQC9b-lWzlwW9ONqS-TzHHybOUI9yqOqs_1xm7F8g4MHCbazEF0M1tIbxU9dXMs-bEGIbFQYhiBKcfVMo6Myl7pGuXPxdG3EzWRVoKxr6fFq0NjGRqekg
app secret
4c5c5fc0ef67828a5a7f871498710742
app id
182337075704275
token
EAACl1aigcdMBAGQP7SzqZASpt8zxoYqiZBvWKw8vZBf1uWTu5SV8xTyzhXmXYThuSZCzZAr3ZCpZALzvG0PjAYD2bxCgWUxyx6looeyyELe8SsbZAruHZAZBeXnYv3ono9rUxrTF5tTZCfzrWOdymLgAZBXMORAlxl7BtQr0bszEo3AS2QZDZD
We collect and we use data as we please. When using this app you agree with that.
Be happy
This file has been truncated, but you can view the full file.
{"count":1000,"totalHits":5640,"took":60,"hits":[{"mdmCounterForEntity":62,"mdmGoldenFieldAndValues":{"mdmtitle":"383 - Lançar Troca / Indenização - DR.","link":"/pages/viewpage.action?pageId=330138544","dumptext":"Lançar Indenização de Pedido de Venda - 383 Visão Geral do Programa A rotina 383 - Lançar Troca/ Indenização tem como objetivo estornar para o cliente (mercadoria ou crédito) o produto que, por algum motivo, não será utilizado pelo mesmo (avariado, vencido, fora de linha etc.). É possível ainda consultar, alterar e imprimir troca/indenização de produto e associar a troca/indenização a um carregamento. Essa indenização deverá estar vinculada a um pedido de venda. As trocas ou indenizações serão concluídas apenas quando for efetuada a devolução através da rotina 1303 - Devolução de Cliente, ou seja, somente quando for feita a entrada de itens de algum pedido já faturado. Objetivo da tela: Tela inicial da rotina 383. Outras Ações/Ações Relacionadas: Ação: Descrição: Registrar Troca Indenização de Pedi
@danielmelogpi
danielmelogpi / artigos-tdn.json
Last active January 31, 2018 19:51
artigos-tdn.xml
[
{"page" : "http://tdn.totvs.com/pages/viewpage.action?pageId:196814001"},
{"page" : "http://tdn.totvs.com/pages/viewpage.action?pageId:198936131"},
{"page" : "http://tdn.totvs.com/pages/viewpage.action?pageId:198939532"},
{"page" : "http://tdn.totvs.com/pages/viewpage.action?pageId:198954465"},
{"page" : "http://tdn.totvs.com/pages/viewpage.action?pageId:200901723"},
{"page" : "http://tdn.totvs.com/pages/viewpage.action?pageId:200906566"},
{"page" : "http://tdn.totvs.com/pages/viewpage.action?pageId:200906593"},
{"page" : "http://tdn.totvs.com/pages/viewpage.action?pageId:200908680"},
{"page" : "http://tdn.totvs.com/pages/viewpage.action?pageId:201722063"},
{
"mustList": [
{
"mdmFilterType": "TYPE_FILTER",
"mdmValue": "chatbotuserGolden"
},
{
"mdmFilterType": "NESTED_TERM_FILTER",
"mdmPath": "mdmGoldenFieldAndValues.chat_connections",
"mdmKey": "mdmGoldenFieldAndValues.chat_connections.id.raw",