Skip to content

Instantly share code, notes, and snippets.

Avatar
💬
searching…

Arnau Siches arnau

💬
searching…
View GitHub Profile
View keybase.md

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:

@arnau
arnau / curl-on-macosx.sh
Created Jul 6, 2015
curl on MacOSX is not able to use TLS via pem
View curl-on-macosx.sh
#
# 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 Dec 5, 2013
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.
View gist:7810725
# 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