Skip to content

Instantly share code, notes, and snippets.

View jstvz's full-sized avatar

James Estevez jstvz

View GitHub Profile
@jstvz
jstvz / eventbug.org
Created October 19, 2017 20:40
SFDX Event bug

Event SFDX bug

Steps to Reproduce

  1. Create a new sfdx project:
sfdx force:project:create -n test

@jstvz
jstvz / yank-as-org.js
Created August 7, 2017 01:17
Vimperator plugin to copy buffer url and title as an org-mode hyperlink
// PLUGIN_INFO//{{{
var PLUGIN_INFO = xml`
<VimperatorPlugin>
<name>Yank as Org</name>
<description>yank-as-org from Vimperator</description>
<author mail="j@jstvz.org" homepage="http://jstvz.org">jstvz</author>
<version>0.1</version>
<minVersion>2.0pre</minVersion>
<maxVersion>2.0pre</maxVersion>
<updateURL>https://github.com/vimpr/vimperator-plugins/raw/master/yank-as-org.js</updateURL>
### Keybase proof
I hereby claim:
* I am jstvz on github.
* I am jstvz (https://keybase.io/jstvz) on keybase.
* I have a public key ASB_OTQ14asIW9vHkwuOMiG4EuEB-2NwSrQ4kqo-nE_pYQo
To claim this, I am signing this object:
@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 / .zshrc
Created April 13, 2017 17:01
Powerlevel9k SFDX default username Prompt
# the correct way, but slow
#sfdx_prompt(){
# local sfdx_default="$(sfdx force:config:list | grep defaultusername | awk '{print $2}')"
# if [[ -n "$sfdx_default" ]]; then
# echo -n " $sfdx_default"
# fi
#}
# the fast way, but incorrect
sfdx_prompt(){
@jstvz
jstvz / sfdx_maps.vim
Last active June 21, 2022 21:15
*DEPRECATED*: Salesforce DX aliases and shell completions for working with sfdx in zsh and vim
" SFDX mappings
" Requires https://github.com/skywind3000/asyncrun.vim
let mapleader = "\<Space>"
nmap <leader>fst :AsyncRun sfdx force:source:status<CR>
nmap <leader>fsp :AsyncRun sfdx force:source:push<CR>
nmap <leader>wfsp :w<CR> :AsyncRun sfdx force:source:push<CR>
nmap <leader>fsl :AsyncRun sfdx force:source:pull<CR>
nmap <leader>fol :AsyncRun sfdx force:org:list<CR>
/**
* @license AngularJS v1.4.4-build.4113+sha.44ce9c8
* (c) 2010-2015 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Any commits to this file should be reviewed with security in mind. *
* Changes to this file can potentially create security vulnerabilities. *
@jstvz
jstvz / fusion_tables_to_csv.py
Last active March 8, 2016 02:11
Fusion tables to csv via pandas.
import pandas as pd
import json
import urllib2
"""
Strip out the callback parameter from your url
"&callback=jQuery17105043562010396272_1404232573870&_=1404232574998"
"""
url = 'https://www.googleapis.com/fusiontables/v1/query?key=AIzaSyAYkamn8YeEjHRpv892i26Mfv6i09eEdPM&sql=SELECT%20beach_id,%20name,%20county,%20mid_lat,%20mid_lon,%20samples,%20pct_samples_bav,%20loc_valid%20FROM%201uK8UlIIOG59txfGjH2WxrDIr_KIxR9lGixkqTple%20WHERE%20state%20=%20%27FL%27&typed=true'
@jstvz
jstvz / key.ipynb
Created June 24, 2014 18:18
Quick and dirty lookup
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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