Skip to content

Instantly share code, notes, and snippets.

@deshion
deshion / .vimrc
Last active October 7, 2020 23:11
Vim configuration with plugins using Vundle
"Using Vundle - Full instructions at https://github.com/gmarik/Vundle.vim
"Install Vundle then plugins using Vundle
"git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
":PluginInstall
syntax on " ensures syntax highlighting for gvim on Win
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
@deshion
deshion / stylish
Created June 5, 2015 03:24
Stylish overrides for Websites
/*Font for Gmail*/
body, td, input, textarea, select, .hP, .ar {
font-family: segoe ui,sans-serif;
}
@deshion
deshion / app_offline.htm
Created June 5, 2015 03:42
Basic maintenance page for IIS
<!doctype html>
<html>
<head>
<title>Down for maintenance</title>
<style type="text/css">
body { background:#e8e8e8; font-family:arial;}
h1, p { text-align:center; }
p { font-size: 20px; }
img { margin:auto; display:block;}
@deshion
deshion / RssRequest.java
Last active August 29, 2015 14:26 — forked from omarmiatello/RssRequest.java
RssRequest for Volley (Android lib)
/**
* Copyright 2013 Omar Miatello - [email protected]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@deshion
deshion / local_puppet.sh
Last active May 3, 2017 22:33
Setup local puppet development environment in Linux
#!/bin/sh
#Run from url
#curl -s https://gist.githubusercontent.com/deshion/b116f1011cdff0702b45/raw | bash /dev/stdin user fullname email
# Bootstrap vim and git
source <<< "$(curl -s -L https://gist.githubusercontent.com/deshion/59b635538280d3afe064daf2750b8707/raw)"
mkdir -p puppet/modules
@deshion
deshion / get_options.sh
Last active September 9, 2024 14:13
Parse command line options for a shell script (POSIX)
#!/bin/sh
# POSIX
# Reset all variables that might be set
file=
verbose=0 # Variables to be evaluated as shell arithmetic should be initialized to a default or validated beforehand.
while :; do
case $1 in
-h|-\?|--help) # Call a "show_help" function to display a synopsis, then exit.
@deshion
deshion / google-bookmark.js
Last active March 9, 2017 22:46
Google Bookmark Javascript
javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("https://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk="+c(b.location)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=510px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();
#!/bin/sh
# Run from url
# curl -s -L https://git.io/deshboot | bash /dev/stdin
# OR
# curl -s -L https://gist.githubusercontent.com/deshion/59b635538280d3afe064daf2750b8707/raw | bash /dev/stdin
#Prereq
# Install git (RHEL6/RHEL7), wget (RHEL7), vim (RHEL7) as root

Salesforce OAuth 2.0 JWT Bearer Token Flow Walk-Through

This document will walk you through how to create or configure a Salesforce application for use with JWT authentication. These configuration steps and the example code works as of Salesforce API version 42.0.

Prerequisites

Create an RSA x509 private key/certification pair