Skip to content

Instantly share code, notes, and snippets.

View rgvaldovino's full-sized avatar

Ricardo Garcia rgvaldovino

  • MX
View GitHub Profile
@xixiaofinland
xixiaofinland / sfdx-cheatsheet.sh
Last active March 28, 2024 18:54
Salesforce SFDX Cheat Sheet
# Proudly supplied by Salesforce Way Site: https://salesforceway.com
# This cheatsheet contains the most often used SFDX commands for beginners to get a jumpstart.
# Hint. it is highly recommended to use `-h` to check the usage of any SFDX commands and corresponding parameters.
# For instance, use `sfdx force:auth:web:login -h` to checke what `-d` `-a` parameters do
# List down all supported dx commands:
sfdx force:doc:commands:list
# Check current DebHub and Scratch Org status
sfdx force:org:list
@brianmfear
brianmfear / PagingSortingController.cls
Last active October 18, 2023 13:48
Lightning Paging and Sorting Demo
global class PagingSortingController {
@AuraEnabled global static Account[] getAccounts() {
return [SELECT Name, Industry, AnnualRevenue FROM Account LIMIT 1000];
}
}
@gretel
gretel / wait_unattended_upgrades.sh
Last active April 4, 2019 08:55
`vagrant` on `ubuntu-16.04` can get in conflict with *unattended-upgrade* running and locking the `dpkg` subsystem. this script waits gracefully
#!/usr/bin/env bash
# https://gist.github.com/gretel/34008d667a8a243a9682e5207619ad95
# 2016 tom hensel <github@jitter.eu>
# `vagrant` on `ubuntu-16.04` can get in conflict with *unattended-upgrade* running and locking the `dpkg` subsystem. this script waits gracefully
# in `Vagrantfile`:
# config.vm.provision 'Wait for unattended-upgrades', type: 'shell', path: './provisioning/wait_unattended_upgrades.sh', args: %w( dpkg apt unattended-upgrade )
#
function wait_procnames {
while true; do
@basti
basti / README.md
Last active October 23, 2017 17:14 — forked from jterrace/xvfb
xvfb init script for Ubuntu
# download and copy xvfb file from this gist to /etc/init.d/

# make it executable
sudo chmod a+x /etc/init.d/xvfb

# start xvfb on display number 10
export DISPLAY=:10
sudo /etc/init.d/xvfb start
@ryanpager
ryanpager / application-session-management-with-oauth.md
Last active July 26, 2020 22:54
Application Session Management With OAuth -- Ionic & AngularJS

Application Session Management With OAuth

Fun with AngularJS & Ionic

I don't know about other developers -- but one of the most frustrating things in my mind to get going when starting a new hybrid application is session/authorization management. Do you use OAuth 1, OAuth 2, generic email login, facebook...even thinking about it stresses me out. Unfortunately, no good hybrid (or mobile for that matter) application can escape the need for good authorization (unless it is a stateless app, like a calculator, or something easy).

Personally -- I have come to love the OAuth 2 standard for its simplicity, and standards of operation. It takes some of the stress out of the decision making process when coming up with how to manage application state flow -- something which is especially necessary in [most] mobile (or native) applications. This article is going to focus on one of those pain points -- hybrid mobile app state management, and how to solve it with regards to the marriage of AngularJS & Ion

@richardvanhook
richardvanhook / ApexOrg2Org
Created September 27, 2011 13:43
Apex code demonstrating how to log in from one salesforce org to another
/*
======================================================================
The following apex code demonstrates logging into another salesforce
org via the SOAP/XML web service api and then using session id to
query the standard REST API as well as the Chatter REST API.
To run this code, simply copy and paste into execute anonymous,
then replace the value of the first three variables accordingly.
NOTES:
(1) You'll need to create a remote site setting for both the login