Skip to content

Instantly share code, notes, and snippets.

View marcofalcioni's full-sized avatar

Marco Falcioni marcofalcioni

View GitHub Profile
@marcofalcioni
marcofalcioni / gist:a388d661a780c9d23cbcb8b6ce47a0d3
Last active December 13, 2020 20:36
Arduino Can't Download library_index.json: How to add an intermediate certificate to a MacOS Java application
# I will use the Arduino application as an example, as I encountered this error while doing some projects at home.
# I think that this method will work with most Java based apps, but YMMV
# I assume you have access to a Unix terminal and basic knowledge of how to use it.
# Step 1: get the certificates from the website you have trouble with
openssl s_client -showcerts -verify 5 -connect downloads.arduino.cc:443 < /dev/null
# This will output a verbose list of a series of certificates (a chain), which is used to establish trust.
# Each certificate starts with a BEGIN CERTIFICATE line and ends with an END CERTIFICATE line. These are part of the certificate.
@view_config(route_name = 'logout', renderer = 'user_management/logout.mak')
def logout(request):
"""Logs out the user"""
headers = forget(request)
request.response.headers = headers
return {}
@marcofalcioni
marcofalcioni / numeric_test.py
Created March 12, 2012 16:56
Inserting and retrieving a numeric value with SQLite
from sqlalchemy import *
engine = create_engine('sqlite:///:memory:')
metadata = MetaData()
table = Table('has_decimal', metadata,
Column('id', Integer, primary_key=True),
Column('numeric', Numeric(10,3)))
metadata.bind = engine