Skip to content

Instantly share code, notes, and snippets.

Avatar

Jason Morrison jasonm

View GitHub Profile
@jasonm
jasonm / 00-README.md
Last active Feb 7, 2018
Salesforce API TLS "Verify return code: 20 (unable to get local issuer certificate)"
View 00-README.md

Starting at Tue 2018-02-06 6:23pmPT we noticed a regular background job which connects to the Salesforce Bulk API via Python client started failing with the following message:

SSLHandshakeError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)

I am able to reproduce the failure to verify (and therefore connect to the API) from outside Python, using the openssl s_client command.

@jasonm
jasonm / 0_reuse_code.js
Created Jan 20, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View gist:d61d285c28b82db9538b
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Term based tool to view *colored*, *incremental* diff in a *Git/Mercurial/Svn*
workspace or from stdin, with *side by side* and *auto pager* support. Requires
python (>= 2.5.0) and ``less``.
"""
META_INFO = {
View gist:86a4e837808b77e1eeab
~/dev/es6exp $ ./node_modules/babel/bin/babel-node
> var { op: a } = { op: 5 };
undefined
> a
5 // this makes sense to me
> var [a=1] = [];
undefined
> a
{ op: 5 } // where did this come from?
>
View gist:0b0b7650ea3ecf730506
[~] cat ~/.ipython/profile_default/ipython_notebook_config.py
c = get_config()
c.NotebookApp.webapp_settings = {
"headers": {
"Access-Control-Allow-Origin": "*"
}
}
View gist:bb610408edf9df852cb8
/tmp $ curl -O https://pypi.python.org/packages/source/s/selenium/selenium-2.42.1.tar.gz
/tmp $ tar xvfz selenium-2.42.1.tar.gz
x selenium-2.42.1/
x selenium-2.42.1/MANIFEST.in
x selenium-2.42.1/PKG-INFO
x selenium-2.42.1/py/
x selenium-2.42.1/py/CHANGES
# (...snip...)
View gist:9340239
(master) ~/dev/pgpitter $ curl -i -d@data localhost:7000/statuses -H "Content-Type: application/json"
HTTP/1.1 500 Internal Server Error
Date: Tue, 04 Mar 2014 04:21:00 GMT
Status: 500 Internal Server Error
Connection: close
Content-Type: text/plain; charset=utf-8
X-Request-Id: 2b7084b6-5eed-48c9-82dd-110f580a5c54
X-Runtime: 0.023212
Transfer-Encoding: chunked
View -
this is a test
whee
View -
this is a test
whee