Skip to content

Instantly share code, notes, and snippets.

View sajadsoft1's full-sized avatar

sajad eskandarian sajadsoft1

  • iran/mashhad
View GitHub Profile
@sajadsoft1
sajadsoft1 / README.md
Created April 10, 2022 20:59 — 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

@muhammad-naderi
muhammad-naderi / IonSetSelfSignedSSL.java
Last active June 22, 2020 03:41
this gist is gathered from here or there on the internet, and I made a few adjustment to support all of Ion getInstance/getDefault models. You just need to call #setSelfSignedSSL() before you make your Ion call to a self signed https endpoint. also put the .cer file in the assets folder
public void setSelfSignedSSL(Context mContext, @Nullable String instanceName){
try {
CertificateFactory cf = CertificateFactory.getInstance("X.509");
// cert file stored in \app\src\main\assets
InputStream caInput = new BufferedInputStream(mContext.getAssets().open("certificate.cer"));
Certificate ca = cf.generateCertificate(caInput);
caInput.close();
@lopspower
lopspower / README.md
Last active September 22, 2024 03:07
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