Skip to content

Instantly share code, notes, and snippets.

View exaland's full-sized avatar
🏠
Working from home

Exaland Concept exaland

🏠
Working from home
  • Exaland Concept
View GitHub Profile
@exaland
exaland / pinningKeyTester.py
Created January 22, 2025 11:05
Pinning Key SSL Tester
import ssl
import socket
import base64
import hashlib
import sys
def verify_certificate_pinning(host, port, expected_pin):
try:
# Ouvre une connexion au serveur
conn = socket.create_connection((host, port))
context = ssl.create_default_context()
@exaland
exaland / angular_s3_cloudfront
Last active January 15, 2025 11:35
Aws S3 - CloudFront Angular Refresh Problem
- Go To AWS Cloud Front
- Go to the „Error Pages“ Tab for your CloudFront Distribution and create a new Custom Error Response.
@exaland
exaland / exaland_firebase_serviceconfig.php
Created December 16, 2024 13:37
Firebase FCM (New Auth with Service Config File) Class for Laravel / Symfony or PHP
<?php
namespace App;
use GuzzleHttp\Client;
class ExalandFirebase
{
private $fcmUrl;
private $serviceAccountPath;
private $httpClient;
@exaland
exaland / Fix IOS Archive Compile Cordova App.txt
Last active November 12, 2024 11:21
Fix IOS Archive Compile Cordova App
Workaround is to update all the generated ...-frameworks.sh files to add the -f flag to the call to readlink. In other words, need to replace:
source="$(readlink "${source}")"
with
source="$(readlink -f "${source}")"
Seems this is CocoaPods issue...
@exaland
exaland / diawi_import_api
Created October 21, 2023 21:19
Import APK or IPA o Diawi by API
# DIAWI IMPORT APK BY API
curl https://upload.diawi.com/ -F token='TOKEN' \
-F [email protected] \
-F callback_emails='[email protected]'
@exaland
exaland / .htaccess
Created July 17, 2023 19:27
Restrict Git Folder Access in Apache
RedirectMatch 404 /\.git
@exaland
exaland / gist:eede22c4c6796f70b664d4bc1e71e29a
Created February 16, 2023 12:35
OSRM - INSTALLATION -
Mettre en place une instance d’OSRM
1 Qu’est ce qu’OSRM
OSRM est un logiciel de calcul d’itinéraire par le plus court chemin utilisant les données d’OpenStreetMap.
OSRM sur GitHub
OSRM dispose d’un serveur de démo pour tester le logiciel. Ce serveur limite les utilisations pour éviter de le surcharger.
Nous devons donc installer et mettre en place notre propre instance d’OSRM.
@exaland
exaland / gist:d04d9e43f6ca6eddcf2f36ab7e55bd40
Last active January 14, 2023 23:17
Create an Redeem Card in PHP
Create a database table to store the gift card information, such as the card number, pin, balance, expiration date, and status (active or redeemed).
Copy code
CREATE TABLE gift_cards (
id INT AUTO_INCREMENT PRIMARY KEY,
card_number VARCHAR(16) NOT NULL,
pin VARCHAR(4) NOT NULL,
balance DECIMAL(10,2) NOT NULL,
expiration_date DATE NOT NULL,
status ENUM('active', 'redeemed') NOT NULL
@exaland
exaland / docker-compose.yml
Created December 19, 2022 20:21
Strapi with MYSQL
version: '3'
services:
strapi:
image: strapi/strapi
container_name: strapi_mysql
environment:
DATABASE_CLIENT: mysql
DATABASE_HOST: mysql
DATABASE_NAME: ${DATABASE_NAME:-strapidb}
@exaland
exaland / docker-compose.yml
Created December 19, 2022 20:18
Stapi with Mongodb
version: "3"
services:
strapiexample:
image: strapi/strapi
container_name: strapiexample
restart: unless-stopped
env_file: .env
environment:
DATABASE_CLIENT: ${DATABASE_CLIENT}
DATABASE_NAME: ${DATABASE_NAME}