Skip to content

Instantly share code, notes, and snippets.

View h1kkan's full-sized avatar
🇺🇦
I may be slow to respond

Ivan h1kkan

🇺🇦
I may be slow to respond
View GitHub Profile
@h1kkan
h1kkan / two-way-encrypt-decrypt.php
Created June 24, 2020 20:59
A simple two-way function to encrypt or decrypt a string
/**
* Encrypt and decrypt
*
* @author Nazmul Ahsan <n.mukto@gmail.com>
* @link http://nazmulahsan.me/simple-two-way-function-encrypt-decrypt-string/
*
* @param string $string string to be encrypted/decrypted
* @param string $action what to do with this? e for encrypt, d for decrypt
*/
function my_simple_crypt( $string, $action = 'e' ) {
@h1kkan
h1kkan / keybase.md
Created August 3, 2020 18:06
keybase.md

Keybase proof

I hereby claim:

  • I am h1kkan on github.
  • I am h1kkan (https://keybase.io/h1kkan) on keybase.
  • I have a public key ASBdKMD9dSWDLHh1AW2mlkBNZt87GH0S2F6Gc140D3SWVAo

To claim this, I am signing this object:

SELECT table,
formatReadableSize(sum(bytes)) as size,
min(min_date) as min_date,
max(max_date) as max_date
FROM system.parts
WHERE active
GROUP BY table