Skip to content

Instantly share code, notes, and snippets.

View hAbd0u's full-sized avatar
πŸ‘€
Looking for new opportunities and challenges

Ilyes Abdelrazak Beladel hAbd0u

πŸ‘€
Looking for new opportunities and challenges
View GitHub Profile
@clandestine8
clandestine8 / Production.Dockerfile
Last active July 1, 2024 23:03
UNIT3D Dockerfile - WIP
FROM php:8.1-fpm-alpine
# ENV & Build ARGS
ENV LARAVEL_DIR /var/www
ARG BRANCH=master
WORKDIR ${LARAVEL_DIR}
# Install Deps
RUN apk add --no-cache git sed nginx nodejs npm openssh-client libzip-dev libsodium-dev icu-dev mysql-client supervisor freetype-dev libjpeg-turbo-dev libpng-dev
RUN apk add --no-cache $PHPIZE_DEPS
@igorbenic
igorbenic / functions-2.php
Last active July 31, 2022 22:26
How to Move Payments on WooCommerce Checkout | https://www.ibenic.com/move-payments-woocommerce-checkout
<?php
/**
* Adding the payment fragment to the WC order review AJAX response
*/
add_filter( 'woocommerce_update_order_review_fragments', 'my_custom_payment_fragment' );
/**
* Adding our payment gateways to the fragment #checkout_payments so that this HTML is replaced with the updated one.
*/
function my_custom_payment_fragment( $fragments ) {
@enl
enl / 01-pure-immutable.php
Last active May 9, 2022 19:13
Immutable classes in PHP
/**
* This class is purely immutable.
* PHP protects the string from changing by its copy-on-change mechanics
* If you do `$str = $immutable->getField();` and then change `$str`
* PHP will copy the value and change only second one.
*/
class Immutable
{
/** @var string */
private $field;
@ammgws
ammgws / letsencrypt-acme-guide.md
Last active July 23, 2023 17:19
Using acme.sh script to renew LetsEncrypt certs using non-standard SSL port

1. Install acme.sh shell script

git clone https://github.com/Neilpang/acme.sh.git
cd acme.sh
./acme.sh --install

Optionally, set the home dir and/or account info (if already have one).
If was previously using LetsEncrypt's certbot, can probably get account info from /etc/letsencrypt/accounts/acme-v01.api.letsencrypt.org/directory/*/regr.json.

@igorbenic
igorbenic / checkout-form-final.php
Last active February 21, 2024 21:34
How to Customize WooCommerce Checkout Pages like a Hero | https://www.ibenic.com/customize-woocommerce-checkout-pages
<?php
/**
* Checkout Form
*
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-checkout.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
@amupoti
amupoti / Resources.md
Last active December 12, 2024 09:22
Useful links regarding different programming activities
@blemoine
blemoine / gist:e6045ed93b3d90a52891
Last active May 14, 2024 15:21
Convert Lambert 93 to GPS Coordinates Latitude / Longitude (wgs84)
Math.tanh = Math.tanh || function(x) {
if(x === Infinity) {
return 1;
} else if(x === -Infinity) {
return -1;
} else {
return (Math.exp(x) - Math.exp(-x)) / (Math.exp(x) + Math.exp(-x));
}
};
// Date Object CheatSheet
// The Date object is used to work with dates and times.
// More: http://www.w3schools.com/jsref/jsref_obj_date.asp
// 1. Instantiating a Date.
var date = new Date();
var date = new Date(milliseconds);
@rxaviers
rxaviers / gist:7360908
Last active May 13, 2025 14:01
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue: