Skip to content

Instantly share code, notes, and snippets.

View ZurabWeb's full-sized avatar
💻
Coding things

Zurab ZurabWeb

💻
Coding things
View GitHub Profile
@ZurabWeb
ZurabWeb / subdomain.php
Created October 6, 2023 12:34
Code golf 10/6/2023
<?php
$subdomain = 'a.b.c.d';
$parts = explode('.', $subdomain);
$resp = [];
while (count($parts) > 0) {
$resp[] = implode('.', $parts);
array_shift($parts);
}
diff --git a/src/Database/PDO.php b/src/Database/PDO.php
index 4ca507a..6fdefd8 100644
--- a/src/Database/PDO.php
+++ b/src/Database/PDO.php
@@ -331,14 +331,14 @@ class PDO extends \PDO {
} else {
$i = 0;
$extraParams = $keys = array();
- foreach ($value as $v) {
- $keys[] = ":{$key}_{$i}";
sudo ls -al /var/log/mysql/mysql.log
ls: cannot access /var/log/mysql/mysql.log: No such file or directory
sudo cat /var/log/mysql/mysql.log
cat: /var/log/mysql/mysql.log: No such file or directory
### Keybase proof
I hereby claim:
* I am ZurabWeb on github.
* I am zurabweb (https://keybase.io/zurabweb) on keybase.
* I have a public key whose fingerprint is 3089 8FD1 CAB7 EEE5 0828 9D4D DEBB CCF1 84A5 5E8C
To claim this, I am signing this object: