Skip to content

Instantly share code, notes, and snippets.

View ragar90's full-sized avatar
💪
grinding the code

René Alfredo García Hernández ragar90

💪
grinding the code
View GitHub Profile
@ragar90
ragar90 / README.md
Created February 13, 2023 21:28 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@ragar90
ragar90 / gist:b1b4f9b917126035a4b1ea3b9f7f229d
Created January 2, 2017 06:57 — forked from jjb/gist:996292
How to securely acquire the Mozilla root certificate bundle for use with curl, Net::HTTP, etc.

If you want to use curl or net-http/open-uri to access https resources, you will often (always?) get an error, because they don't have the large number of root certificates installed that web browsers have.

You can manually install the root certs, but first you have to get them from somewhere. This article gives a nice description of how to do that. The source of the cert files it points to is hosted by the curl project, who kindly provide it in the .pem format.

problem: Sadly, ironically, and comically, it's not possible to access that file via https! Luckily, the awesome curl project does provide us with the script that they use to produce the file, so we can do it securely ourselves. Here's how.

  1. git clone https://github.com/bagder/curl.git
  2. cd curl/lib
  3. edit mk-ca-bundle.pl and change: