Skip to content

Instantly share code, notes, and snippets.

View jhuesser's full-sized avatar

jhuesser jhuesser

View GitHub Profile
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@neverything
neverything / comopser-wp-cli.md
Last active December 7, 2021 07:42
Install composer and wp-cli on cyon.ch hostings with SSH access.

Cyon.ch/Hostpoint - Install composer & wp-cli

SSH into your server and stay in the home directory of the user. Check if you have a bin directory in your user directory already, in case you do, omit the mkdir bin.

Use bin folder in $HOME for user scriptsr

For the commands to be loaded from the bin directory run echo "export PATH=$HOME/bin:$PATH" >> ~/.bashrc. For the new config to be used run source ~/.bashrc or close and reopen your SSH session.

Composer

@mpezzi
mpezzi / inc.language.php
Created March 29, 2010 20:39
PHP Simple Translation Engine
<?php
define('LANG_ENGLISH', 'en');
define('LANG_FRENCH', 'fr');
define('LANG_SPANISH', 'es');
// Look for l in query string and set as language.
$language = isset($_GET['l']) ? $_GET['l'] : LANG_ENGLISH;
/**