Skip to content

Instantly share code, notes, and snippets.

View bipoza's full-sized avatar
📱

Bittor Poza bipoza

📱
View GitHub Profile
@bipoza
bipoza / README.md
Created June 5, 2024 07:46 — 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

@bipoza
bipoza / google-login.html
Last active September 29, 2023 08:02
Google Login with Javascript
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Hello Analytics - A quickstart guide for JavaScript</title>
</head>
<body>
<h1>GOOGLE LOGIN</h1>
<script>
@bipoza
bipoza / ionic-react-custom-hook-to-customize-the-scrollbar.md
Last active November 25, 2022 14:04
Ionic React - Custom hook to customize the scrollbar

How to use

import useCustomIonContentScroll from './useCustomIonContentScroll';

const YourIonPage: React.FC = () => {
    const customIonContentScrollRef = useCustomIonContentScroll();

    return (
 
@bipoza
bipoza / fetch-and-convert-to-base64.js
Last active November 14, 2022 11:35 — forked from n1ru4l/index.js
Fetch blob and convert to base64
export const fetchAsBlob = url => fetch(url)
.then(response => response.blob());
export const convertBlobToBase64 = blob => new Promise((resolve, reject) => {
const reader = new FileReader;
reader.onerror = reject;
reader.onload = () => {
resolve(reader.result);
};
reader.readAsDataURL(blob);
@bipoza
bipoza / sign-in-with-apple.md
Created March 1, 2022 16:18 — forked from aamishbaloch/sign-in-with-apple.md
Sign In with Apple using Django (Python) Backend

Implementing Sign In with Apple in your Django (Python) backend

Apple announced a new feature, "Sign In with Apple" enabling users to sign in to apps using their Apple ID. This new feature is meant to be a secure and privacy-friendly way for users to create an account in apps. Most iOS and Mac users already have an Apple ID, and this new feature lets them use that Apple ID to sign in to other apps and websites.

Apple is taking a firm stance to protect user's privacy, rather than letting applications see the user's real email address, they will provide the app with a fake or random email address unique to each app. Don't you worry! Developers will still be able to send emails to these proxy addresses, it just means developers won't be able to use the email addresses in any other way. This feature will also allow users to disable email forwarding per application.

How it works

Apple adopted the existing standards OAuth 2.0 and OpenID Connect to use as the foundation for their new API. If you're familiar

@bipoza
bipoza / jwt-apple-signin.py
Created December 2, 2021 14:48 — forked from davidhariri/jwt-apple-signin.py
Code required to verify Sign in with app-made Apple JWT tokens server-side in Python
import jwt
from jwt.algorithms import RSAAlgorithm
import requests
from time import time
import json
import os
APPLE_PUBLIC_KEY_URL = "https://appleid.apple.com/auth/keys"
APPLE_PUBLIC_KEY = None
@bipoza
bipoza / pdf-viewer.component.html
Last active November 18, 2021 08:15
Ionic 5 pdf-viewer with zoom options
<ion-content>
<ion-fab vertical="top" horizontal="end" slot="fixed">
<ion-fab-button color="light" size="small" mode="ios">
<ion-backdrop></ion-backdrop>
<ion-icon name="close"></ion-icon>
</ion-fab-button>
</ion-fab>
<pdf-viewer [src]="{url:fileUrl}" [zoom]="pdfZoom" [fit-to-page]="true" type="application/pdf"></pdf-viewer>
/**
* <function description>
* @param {<type>} param1 <description>
* @param {<type>} param2 <description>
* @param {<type>} param3 <description>
* @return {<type>} <description>
*/
Example
@bipoza
bipoza / euskal_herriko_herrien_koordenatuak.json
Last active October 8, 2021 12:42
Euskal Herriko herrien koordenatuak
[
{
"nombre":"Alegría-Dulantzi",
"cords":{
"Latitud":42.84149,
"Longitud":-2.513507
}
},
{
"nombre":"Amurrio",