Skip to content

Instantly share code, notes, and snippets.

View ricardo85x's full-sized avatar

Ricardo T ricardo85x

View GitHub Profile
@ricardo85x
ricardo85x / Configure PHP 5.3 and 7.2 on Centos 6
Created August 16, 2019 14:22
How to configure Multi php on Centos 6 with default PHP5.3 and new PHP 7.2
Let's assume you alread have a old system running with php5.3
# 1 - Install Remi and Epel repository
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# Install php72
yum install php72-runtime php72-php-common php72 php72-php-fpm php72-php-mysqlnd php72-php-json php72-php-xml php72-php-mbstring php72-php-pdo php72-php-cli
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
@ricardo85x
ricardo85x / hide_games_from_emulationstation_desktop.py
Last active August 8, 2022 00:42
Hide non working roms on EmulationStation DE
from xml.etree import ElementTree as et
# gamelist.xml generated by emulationstation desktop
# ~/.emulationstation/gamelists/mame/gamelist.xml
gamelist_path = r"./gamelist.xml"
# http://adb.arcadeitalia.net/download.php (mame246-gamelist.xml.zip)
mameXXX_gamelist_path = r"./mame246-gamelist.xml"
# list of games to hide
@ricardo85x
ricardo85x / main.java
Last active October 9, 2023 03:42
When using stripe-java to get the expanded total_details.breakdown from checkout session, some fields inside discount are missing like id and promotion_code
package org.ricardoteixeira;
import com.stripe.Stripe;
import com.stripe.model.checkout.Session;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Main {