Skip to content

Instantly share code, notes, and snippets.

View pH-7's full-sized avatar
:octocat:
💡Creative Engineer 🚀 Enjoying Learning New Exciting Things! 😋 =>My Way of Life 🏝

♚ PH⑦ de Soria™♛ pH-7

:octocat:
💡Creative Engineer 🚀 Enjoying Learning New Exciting Things! 😋 =>My Way of Life 🏝
View GitHub Profile
@pH-7
pH-7 / Utf8.class.php
Created April 24, 2012 16:17
UTF-8 friendly PHP class
<?php
/**
* @desc This program was amended by Pierre-Henry.
* @author SORIA Pierre-Henry <pierrehs@hotmail.com>
* @version 2.1.4 (Last update 2012/06/21).
*
*
* UTF-8 friendly replacement functions - v0.2
* Copyright (C) 2004-2006 Niels Leenheer & Andy Matsubara
*
@pH-7
pH-7 / .gitconfig
Last active October 26, 2022 00:13
My ~/.gitconfig
[user]
name = Pierre-Henry Soria
email = $EMAIL_ADDRESS
[init]
defaultBranch = main
[color]
diff = auto
status = auto
@pH-7
pH-7 / index.php
Last active July 15, 2020 22:23
Split Testing (marketing A/B testing) with Wordpress - Display a Random Page with Wordpress. Frensh Tutorial 👉 https://01script.com/page-aleatoire-wordpress-split-testing/
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
<?php
$sPhoneNum = '**********'; // Le numéro de téléphone qui recevra l'SMS (avec le préfixe, ex: +33)
$aProviders = array('vtext.com', 'tmomail.net', 'txt.att.net', 'mobile.pinger.com', 'page.nextel.com');
foreach ($aProviders as $sProvider)
{
if (mail($sPhoneNum . '@' . $sProvider, '', 'Ce texto a été envoyé avec PHP, tout simplement !'))
{
// C'est bon, l'SMS a correctement été envoyé avec le fournissuer
break;
@pH-7
pH-7 / udemy-full-discount.py
Last active December 6, 2022 12:51
Get all Udemy Courses with 100% off Coupons thanks to growthcoupon.com & Importer.io
##########
##
## Get all Udemy Courses with 100% off Coupons thanks to growthcoupon.com & Importer.io
##
##########
from json import loads
from bs4 import BeautifulSoup
import mechanize
@pH-7
pH-7 / mylocalserverip.sh
Last active May 21, 2023 03:17
Get my server local IP (saver time if you change very often your machine) - https://github.com/HiDeaUp/hideaup.github.io
ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'
@pH-7
pH-7 / wp-datas.php
Last active April 14, 2024 03:38
This is used by hackers wanna hack Wordpress sites. With this file, most of the time hackers add HTML files to promote them (usually Chinese posts/products) on your server, change the Google Webmaster account and add new sitemap file (containing the HTML files added) to request new indexation of the compromising site by Google, etc. This can be …
<?php
/**
* This is used by hackers wanna hack Wordpress sites. With this file, most of the time hackers add HTML files to promote
* them (usually Chinese posts/products) on your server, change the Google Webmaster account and add new sitemap file
* (containing the HTML files added) to request new indexation of the compromising site by Google, etc.
* This can be very dangerous and destroy your whole reputation.
* Most of the time hackers are able to upload this file on crappy (most are!) sharing Web host.
* Be really careful and scan your site + overwritten all files by new ones
*/
header("Content-type:text/html;charset=utf-8");
@pH-7
pH-7 / upgrade-from-ph7cms-1.3.6-to-1.3.7.sql
Last active June 25, 2017 15:56
Update SQL DB from pH7CMS 1.3.6 to pH7CMS 1.3.7
--
-- Author: Pierre-Henry Soria <ph7software@gmail.com>
-- Copyright: (c) 2013-2016, Pierre-Henry Soria. All Rights Reserved.
-- License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
--
--- Replace 'PH7_' by your prefix set in "~/_protected/app/configs/config.ini" [database] prefix var
UPDATE PH7_Settings SET `name` = 'bgProfileManualApproval' WHERE `name` = 'profileBackgroundManualApproval';
@pH-7
pH-7 / upgrade-ph7cms-1.3.9-to-1.4.*.sql
Last active August 13, 2016 17:34
Update SQL file for the new IM payment integration & Two-Factor authentication feature
--
-- Author: Pierre-Henry Soria <hello@ph7cms.com>
-- Copyright: (c) 2016, Pierre-Henry Soria. All Rights Reserved.
-- License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
--
----- Update Two-Factor authentication feature
ALTER TABLE pH7_Admins ADD COLUMN isTwoFactorAuth enum('1','0') DEFAULT '0';
ALTER TABLE pH7_Admins ADD COLUMN twoFactorAuthSecret varchar(40) DEFAULT NULL;
@pH-7
pH-7 / _constants.php
Last active October 17, 2016 18:33
Script to update pH7CMS from 1.4.2 to 2.0.4
<?php
/*
YOUR PERSONAL CONSTANTS ARE BELOW
...
...
...
*/
// Add it in the end of the file