Skip to content

Instantly share code, notes, and snippets.

@ofarras
ofarras / notify.yml
Created May 5, 2020 20:41 — forked from trung/notify.yml
Notify slack about Github Actions workflow and its jobs status. `notify` job must be the last job in the workflow and it must depend on all other jobs
notify:
if: always()
name: Notify
needs:
- job1
- job2
- job11
- job3
- job4
runs-on: ubuntu-latest
@ofarras
ofarras / Salesforce JS 1 certification session 1
Created May 6, 2021 14:30 — forked from karkranikhil/Salesforce JS 1 certification session 1
Salesforce JavaScript Developer 1 certification series
// The console.log() is a function that writes a message to log on the debugging console
// Names can contain letters, digits, underscores, and dollar signs.
// No limit o the length of the variable name
// Names can begin with letter, $ and _
// Reserved words(like switch, if else) cannot be used as names
// console.log(null+'10');
// var name = "Nikhil"
// var age = 23
@ofarras
ofarras / domiciliaciones_bancarias.xml
Created October 15, 2021 07:42 — forked from metelidrissi/domiciliaciones_bancarias.xml
Ejemplo de documento XML para domiciliaciones
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02">
<CstmrDrctDbtInitn>
<GrpHdr>
<MsgId>PRE2018*****</MsgId>
<CreDtTm>2018-12-10T14:31:01</CreDtTm>
<NbOfTxs>2</NbOfTxs>
<CtrlSum>200</CtrlSum>
<InitgPty>
<Nm><strong>TU NOMBRE COMERCIAL</strong></Nm>
<Id>
@ofarras
ofarras / sfpublicgroups.py
Created March 26, 2022 17:12 — forked from harperbrett/sfpublicgroups.py
Query Salesforce Public Groups and Their Users with Python
from simple_salesforce import Salesforce
import pandas as pd
sf = Salesforce(username="yourSFusername",password="youSFpassword", security_token="yourSFsecuritytoken")
Group_Members = sf.query_all("Select GroupId,UserOrGroupId from GroupMember")
Active_Users = sf.query_all("Select Username,Name,Id from User where isActive = True")
Groups = sf.query_all("Select Id,Name,Type from Group")
Group_Members_DF = pd.DataFrame(Group_Members['records'])
Users_DF = pd.DataFrame(Active_Users['records'])
@ofarras
ofarras / OrderLineItem.java
Created January 30, 2023 16:48 — forked from amitastreait/OrderLineItem.java
How to Create order Line Item in salesforce Apex
Product2 p = new Product2();
p.Name = 'Test Product';
p.Description='Test Product';
p.productCode = 'ABC';
p.isActive = true;
insert p;
PricebookEntry standardPrice = new PricebookEntry();
standardPrice.Pricebook2Id = Test.getStandardPricebookId();
standardPrice.Product2Id = p.Id;
@ofarras
ofarras / InvocableApexTemplate.cls
Created March 28, 2023 10:50 — forked from douglascayers/InvocableApexTemplate.cls
Example structure of an invocable apex class
public with sharing class InvocableApexTemplate {
@InvocableMethod(
label = 'Name as displayed in Process Builder'
description = 'Tooltip as displayed in Process Builder'
)
public static List<Response> execute( List<Request> requests ) {
List<Response> responses = new List<Response>();
@ofarras
ofarras / README.md
Created July 24, 2023 12:36 — forked from tringn/README.md
Install OhMyZsh with agnoster theme in MacOS Catalina Terminal

Step 1: Install Zsh (this may not be necessary because Zsh has been installed in MacOs Catalina)

brew install zsh

Step 2: Install OhMyZsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Step 3: Change shell in Mac Terminal from Bash to Zsh

chsh -s /bin/zsh

Step 4: Open ~/.zshrc, change ZSH_THEME from "robbyrussell" to "agnoster"

List all alias
keytool -list -v -keystore ClientCert.pfx -storepass Password1 -storetype PKCS12
Change an alias
keytool -changealias -alias "pvktmp:696deac3-0855-476c-b945-9bd3bacb4f2f" -destalias "clientcertax" -keypass Password1 -keystore ClientCert.pfx -storepass Password1
Convert pfx to jks
keytool -importkeystore -srckeystore ClientCert.pfx -srcstoretype pkcs12 -destkeystore clientcertax.jks -deststoretype JKS
@ofarras
ofarras / vscode-macos-context-menu.md
Created October 27, 2023 07:17 — forked from idleberg/vscode-macos-context-menu.md
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • Open Automator
  • Create a new document
  • Select Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
    • your default shell should already be selected, otherwise use /bin/zsh for macOS 10.15 (”Catalina”) or later
    • older versions of macOS use /bin/bash
  • if you're using something else, you probably know what to do 😉
@ofarras
ofarras / findandexport.sh
Created June 28, 2024 07:11
Buscar contenido en fichero y exportar a csv
#!/bin/bash
# Definir la carpeta donde buscar los archivos
search_dir="force-app/main/default/classes"
# Nombre del archivo CSV de salida
output_file="resultados_httpreq.csv"
# Encabezado del archivo CSV
echo "Archivo,Linea,Contenido" > $output_file