Skip to content

Instantly share code, notes, and snippets.

View arnau's full-sized avatar
💬
searching…

Arnau Siches arnau

💬
searching…
View GitHub Profile
@arnau
arnau / curl-on-macosx.sh
Created July 6, 2015 16:15
curl on MacOSX is not able to use TLS via pem
#
# When in MacOSX, running:
curl --cacert ca.pem --cert cert.pem --key key.pem https://192.168.99.100:2375
# Fails with:
# curl: (58) SSL: Can't load the certificate "/Users/arnau/.docker/machine/machines/dev/cert.pem" and its private key: OSStatus -25299
#
# This is explained here: https://github.com/bagder/curl/issues/283#issuecomment-104070069
#
# In short, MacOSX does not allow curl to use pem in this case. A P12 must be used instead.
openssl pkcs12 -export -out cert.pfx -inkey key.pem -in cert.pem -certfile ca.pem
@arnau
arnau / gist:7810725
Created December 5, 2013 18:33
A ruby class extracted from an internal lib that transforms UTM coords to Geodesic and from Asia coords to UTM. It's specific to deal with The City Council of Barcelona's opened data.
# encoding: utf-8
##
# Canonizes a geoposition as a geodesic coordinate.
#
# The “Asia” coords were created by the City Council of Barcelona
# and they are still used in some internal systems. The problem
# appears when http://opendata.bcn.cat/ opens data using this non
# standard system.
#
# @author Arnau Siches
@arnau
arnau / keybase.md
Last active November 9, 2017 07:44

Keybase proof

I hereby claim:

  • I am arnau on github.
  • I am arnau (https://keybase.io/arnau) on keybase.
  • I have a public key whose fingerprint is D44B 0881 65E2 4B2B 0B37 11BF 0E97 93A7 3316 F53B

To claim this, I am signing this object: