Skip to content

Instantly share code, notes, and snippets.

@diter14
diter14 / fetch-products.md
Last active October 26, 2017 19:47
Iterar Productos en Cotizaciones - Zoho CRM

Iterar Productos desde Cotizaciones - Zoho CRM

Zoho Deluge

  • Obtener récord de módulo de venta específico (Cotizaciones, Orden, Factura...)
record = zoho.crm.getRecordById("ModuleName",recordId);
  • Extraer arreglo de productos del récord
git branch -m old_branch_name new_branch_name # Rename branch locally
git push origin :old_branch_name # Delete the old branch
git push --set-upstream origin new_branch_name # Push the new branch, set local branch to track the new remote
highlight_string("<?php\n\$data =\n" . var_export($data, true) . ";\n?>");
Account acc = Database.query('SELECT ' + String.join(new List<String>(Schema.getGlobalDescribe().get('Account').getDescribe().fields.getMap().keySet()), ',') + ' FROM Account');
@diter14
diter14 / git-flow_windows.md
Last active August 7, 2018 15:26
Git Flow Windows Install

Git-Flow Windows Install

  • Instalar Git en Windows

    • Asegurarse de settear: "Checkout as-is, commit Unix-style line endings."
  • Descargar los siguientes paquetes:

    • Paquete getopt
      • Descomprimir y copiar getopt.exe a C:\Program Files (x86)\Git\bin
    • DLL
  • Descomprimir y copiar libintl3.dll a C:\Program Files (x86)\Git\bin
@diter14
diter14 / How to handle dates in PHP.md
Last active September 7, 2018 14:16
How to add or subtract dates in PHP

How to add or subtract dates in PHP

  • For current date
// You can add or subtract days, weeks, months, years using
// (+/-)(number) (day|week|month|year)
// e.g. "+1 year"

$currentDate = date('Y-m-d');
@diter14
diter14 / Remove branch locally and remotelly.md
Created September 18, 2018 17:47
Remove branch locally and remotelly

Remove branch locally and remotelly

// To remove locally branch
git branch -d branch_name

// To remove remotelly branch
git push origin :branch_name
    $keyToSearch = 'age';
    $valueToSearch = 20;
    $multidimensional = [
        [
            'name' => 'Barry Allen',
            'age' => 20,
        ],
        [
 'name' =&gt; 'Steve Rogers',
@diter14
diter14 / sleep.js
Last active February 20, 2019 14:04 — forked from eteeselink/delay.js
ES7 async/await version of setTimeout
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
async function doSomething() {
console.log("this might take some time....");
await sleep(5000);
console.log("done!")
}
doSomething();