Skip to content

Instantly share code, notes, and snippets.

View MyronProDev's full-sized avatar

Myron MyronProDev

  • PHP Developer
  • Ukraine, Kyiv
View GitHub Profile
@MyronProDev
MyronProDev / cloudSettings
Last active March 31, 2020 10:58
Setting for environment VS Code
{"lastUpload":"2019-12-29T12:06:45.338Z","extensionVersion":"v3.4.3"}
@MyronProDev
MyronProDev / Install update WordPress puglins directly.md
Created March 31, 2020 10:57 — forked from dianjuar/Install update WordPress puglins directly.md
Install update WordPress plugins without providing ftp access

Install WordPress plugins directly (without FTP)

Put this on your wp-config.php

/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
@MyronProDev
MyronProDev / gist:ae269206562a5817049f59961cebb96d
Created March 19, 2021 17:43
Password Encryption with OpenSSL | PHP
<?php
// Create The First Key
echo base64_encode(openssl_random_pseudo_bytes(32));
// Create The Second Key
echo base64_encode(openssl_random_pseudo_bytes(64));
?>
--------------------------------------------------------
<?php
// Save The Keys In Your Configuration File
@MyronProDev
MyronProDev / wp-config-debug.php
Created October 17, 2021 14:31 — forked from jrfnl/wp-config-debug.php
Code to add to wp-config.php to enhance information available for debugging.
<?php
/**
* == About this Gist ==
*
* Code to add to wp-config.php to enhance information available for debugging.
*
* You would typically add this code below the database, language and salt settings
*
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists).
*
@MyronProDev
MyronProDev / README.md
Created February 4, 2023 12:13 — forked from jesster2k10/README.md
JWT Auth + Refresh Tokens in Rails

JWT Auth + Refresh Tokens in Rails

This is just some code I recently used in my development application in order to add token-based authentication for my api-only rails app. The api-client was to be consumed by a mobile application, so I needed an authentication solution that would keep the user logged in indefinetly and the only way to do this was either using refresh tokens or sliding sessions.

I also needed a way to both blacklist and whitelist tokens based on a unique identifier (jti)

Before trying it out DIY, I considered using: