Skip to content

Instantly share code, notes, and snippets.

View exaland's full-sized avatar

Exaland Concept exaland

  • Exaland Concept
View GitHub Profile
@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 file=@MyApp.ipa \
-F callback_emails='me@company.com'
@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}
@exaland
exaland / gradle-android12-merge
Created September 30, 2022 12:24
Gradle Script for Android 12 Required Merge
import org.w3c.dom.Element
import org.w3c.dom.Node
import javax.xml.transform.dom.DOMSource
import javax.xml.transform.stream.StreamResult
import javax.xml.transform.TransformerFactory
import javax.xml.transform.Transformer
/**
* For apps targeting Android 12, if the AndroidManifest.xml file contains <activity>, <activity-alias>, <service>, or
@exaland
exaland / colissimo-php.txt
Created January 28, 2022 22:58
COLISSIMO PRINT LABEL - PHP
<?php
/**
* This sample code comes with the shipping web service of La Poste Colissimo
* The example builds a request, send it to the web service, then parse its response and save the generated label to the
specified location
* @author La Poste Colissimo - solutions.colissimo@laposte.fr
*/
define("SERVER_NAME", 'https://ws.colissimo.fr'); //TODO : Change server name
define("LABEL_FOLDER",'./labels/'); //TODO : Change OutPut Folder: this is where the label will be saved
//Build the input request : adapt parameters according to your parcel info and options
@exaland
exaland / Docker Redis + Redis Insight
Last active June 5, 2021 19:50
Docker Compose for Create Redis with Redis Insight
version: '3.3"
services:
redis:
container_name: redis
image: redis:4.0.11-alping
environment:
- REDIS_PASSWORD=mypassword
- REDIS_REPLICATION_mode=master
#command
#- "--requirepass=mypassword"
@exaland
exaland / restore_git_deleted_file.txt
Created February 15, 2020 16:28
Restore deleted file with last commit
git checkout -f HEAD