Skip to content

Instantly share code, notes, and snippets.

View jstvz's full-sized avatar

James Estevez jstvz

View GitHub Profile
@jstvz
jstvz / force-showToast.js
Created May 13, 2017 02:14 — forked from joebuschmann/force-showToast.js
force:showToast event handler in a VF page
var postEventToOneApp = function(name, params, fallbackAction) {
if (SfdcApp && SfdcApp.projectOneNavigator && SfdcApp.projectOneNavigator.fireContainerEvent) {
// Not officially supported by Salesforce
SfdcApp.projectOneNavigator.fireContainerEvent(name, params);
} else if (fallbackAction) {
// Fallback if no Salesforce support of fireContainerEvent
fallbackAction();
}
};
@jstvz
jstvz / shell
Created October 19, 2013 00:42 — forked from obfusk/shell
#!/system/xbin/bash
CHROOT=/data/__felix__/__chroot__
if [ -z "$1" -o "$1" == root ]; then
CMD='/bin/bash -l'
else
CMD="/bin/su - $1"
fi
@jstvz
jstvz / init.sh
Created January 29, 2013 03:53 — forked from lrvick/init.sh
USER='lrvick'
cd /data/local/arch
if ! mountpoint -q dev; then
mount -t proc /proc proc
mount -o bind /dev dev
mount -o bind /dev/pts dev/pts
fi