Skip to content

Instantly share code, notes, and snippets.

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

from botocore.credentials import RefreshableCredentials
from botocore.session import get_session
from boto3 import Session
def assumed_session(role_arn, session_name, session=None):
"""STS Role assume a boto3.Session
With automatic credential renewal.
@ferrouswheel
ferrouswheel / install_ffmpeg.sh
Created March 16, 2022 06:32 — forked from Piasy/install_ffmpeg.sh
brew install ffmpeg with all options
brew options ffmpeg
brew install ffmpeg \
--with-chromaprint \
--with-fdk-aac \
--with-fontconfig \
--with-freetype \
--with-frei0r \
--with-game-music-emu \
--with-libass \
@ferrouswheel
ferrouswheel / Install_OpenCV4_CUDA11_CUDNN8.md
Created March 15, 2022 04:39 — forked from raulqf/Install_OpenCV4_CUDA11_CUDNN8.md
How to install OpenCV 4.5 with CUDA 11.2 in Ubuntu 20.04

How to install OpenCV 4.5.2 with CUDA 11.2 and CUDNN 8.2 in Ubuntu 20.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@ferrouswheel
ferrouswheel / docker.md
Created December 27, 2021 23:32 — forked from FreddieOliveira/docker.md
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@ferrouswheel
ferrouswheel / dropzone.dart
Created July 4, 2021 20:26 — forked from mosheduminer/dropzone.dart
Implementation of a drag-and-drop zone for flutter web. Inspired by https://gist.github.com/PlugFox/ffe83a91ce50f9c78a5b1d6674e36d1b
import 'dart:async';
import 'dart:html';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
enum _DragState {
dragging,
notDragging,
}
@ferrouswheel
ferrouswheel / add_glue_partitions.py
Created April 24, 2020 01:21 — forked from JoaoCarabetta/README.md
Add Glue Partitions with Lambda AWS
import json
import boto3
from dateutil import rrule
from datetime import datetime, timedelta
glue = boto3.client('glue', '--') # Update with your location
s3 = boto3.client('s3')
def get_current_schema(table_name, database_name):
@ferrouswheel
ferrouswheel / Synology-Diskstation-Git.md
Created October 2, 2018 03:31 — forked from walkerjeffd/Synology-Diskstation-Git.md
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@ferrouswheel
ferrouswheel / gist:a547be2fe5b2ae683c8aac45f271560c
Created August 3, 2018 00:58 — forked from luckydev/gist:b2a6ebe793aeacf50ff15331fb3b519d
Increate max no of open files limit in Ubuntu 16.04 for Nginx
# maximum capability of system
user@ubuntu:~$ cat /proc/sys/fs/file-max
708444
# available limit
user@ubuntu:~$ ulimit -n
1024
# To increase the available limit to say 200000
user@ubuntu:~$ sudo vim /etc/sysctl.conf
@ferrouswheel
ferrouswheel / Readme.md
Created January 14, 2017 22:15 — forked from myfavouritekk/Readme.md
Extract dense optical flow and save as grayscale or RGB images

#Extract dense optical flow and save as grayscale or RGB images Copyright @ Kai Kang (myfavouritekk@gmail.com) 2016

##Dependencies

  • OpenCV 2 with Python interface
  • glob, numpy, siopy

##Usages

# help messages