Skip to content

Instantly share code, notes, and snippets.

@madewulf
madewulf / salesforce.py
Created May 18, 2017 13:32
Python Flask and the Force.com REST API: Simple simple-salesforce example
from flask import Flask, redirect, request
import requests
from simple_salesforce import Salesforce
consumer_key = 'your_consumer_key'
consumer_secret = 'your_consumer_secret'
access_token_url = 'https://login.salesforce.com/services/oauth2/token'
redirect_uri = 'http://localhost:5000/callback'
authorize_url = 'https://login.salesforce.com/services/oauth2/authorize'
@ghoranyi
ghoranyi / AWS Swarm cluster.md
Last active May 31, 2021 05:28
Create a Docker 1.12 Swarm cluster on AWS

This gist will drive you through creating a Docker 1.12 Swarm cluster (with Swarm mode) on AWS infrastructure.

Prerequisites

You need a few things already prepared in order to get started. You need at least Docker 1.12 set up. I was using the stable version of Docker for mac for preparing this guide.

$ docker --version
Docker version 1.12.0, build 8eab29e

You also need Docker machine installed.

upstream unicorn {
server unix:/tmp/unicorn.portal.sock fail_timeout=0;
}
server {
listen 80 default deferred;
server_name secure.example.com;
root /home/user/www/secure.example.com/current/public;
location ^~ /assets/ {