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 / ds_store_removeFile.txt
Last active January 26, 2020 20:05
Remove DS_Store file with underscore prefix files
# Remove all Underscore prefix files DS_Store
- Type this command in Terminal
sudo find / -name "._*" -exec rm -rf {} \;
@exaland
exaland / restore_git_deleted_file.txt
Created February 15, 2020 16:28
Restore deleted file with last commit
git checkout -f HEAD
@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 / ios-simulator-build-app.markdown
Last active June 15, 2021 02:16
iOS Simulator Build APP for export and test your app

Make Build Ios from Simulator

ditto -ck --sequesterRsrc --keepParent `ls -1 -d -t ~/Library/Developer/Xcode/DerivedData/*/Build/Products/*-iphonesimulator/*.app | head -n 1` /path/ofyourchoice/MyApp.zip

Test your app

ios-sim launch /path/to/your-app.app
@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 / 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 / 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 / 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