Skip to content

Instantly share code, notes, and snippets.

View yoyosan's full-sized avatar
🏠
Working from home

Marius Palade yoyosan

🏠
Working from home
View GitHub Profile

F                                                                   1 / 1 (100%)

Time: 2.52 seconds, Memory: 34.00MB

There was 1 failure:

1) Tests\Unit\Dispatcher\Engine\BatchingTest::batching_selects_the_closest_order_to_the_current_one
Failed asserting that 255 matches expected 251.
@yoyosan
yoyosan / remove_exception_typehint.patch
Last active December 28, 2018 14:34
Remove `Exception` type hint from laravel 4.2 Whoops lib, for PHP 7.1
diff --git a/vendor/filp/whoops/src/Whoops/Exception/Inspector.php b/vendor/filp/whoops/src/Whoops/Exception/Inspector.php
index 06aeec31b..c2873f2e5 100644
--- a/vendor/filp/whoops/src/Whoops/Exception/Inspector.php
+++ b/vendor/filp/whoops/src/Whoops/Exception/Inspector.php
@@ -28,7 +28,7 @@ class Inspector
/**
* @param Exception $exception The exception to inspect
*/
- public function __construct(Exception $exception)
+ public function __construct($exception)
@yoyosan
yoyosan / research_tech_documentation.md
Last active March 1, 2019 17:50
Research about how others do technical documentation
https://www.europosters.ro/never-give-up-motivational-quote-f112518765
https://www.europosters.ro/don-t-stop-when-you-re-tired-f163177255 - nu mai au varianta mea
https://www.europosters.ro/motivational-fitness-quote-f117808152
@yoyosan
yoyosan / emby-upgrade.md
Last active August 13, 2019 07:50
FreeNAS 11.2 - Update Emby server to recent release

Install through the web interface a fresh jail of EmbyServer.

Connect to the NAS through SSH:

iocage console emby
service emby-server stop
cd /tmp
# latest releases can be found here: https://github.com/MediaBrowser/Emby.Releases/releases
fetch https://github.com/MediaBrowser/Emby.Releases/releases/download/4.2.1.0/emby-server-freebsd11_4.2.1.0_amd64.txz
@yoyosan
yoyosan / mariadb.md
Created December 11, 2020 07:35
MariaDB 10.2 upgrade on CentOS 7

A MySQL or MariaDB server package (MariaDB-server-10.1.48-1.el7.centos.x86_64) is installed.

Upgrading directly from MySQL 10.1 to MariaDB 10.2 may not be safe in all cases. A manual dump and restore using mysqldump is recommended. It is important to review the MariaDB manual's Upgrading section for version-specific incompatibilities.

A manual upgrade is required.

  • Ensure that you have a complete, working backup of your data and my.cnf
@yoyosan
yoyosan / hdmi-switch.sh
Last active May 19, 2021 08:55
Example scripts of switching HDMI outputs when using Pipewire
#!/bin/bash
hdmi="$(pactl list sinks|grep Name|grep hdmi|sed 's/Name: //'|sed 's/\s//')"
pactl set-default-sink "$hdmi"
pactl set-sink-port "$hdmi" hdmi-output-2
pactl set-card-profile alsa_card.pci-0000_0b_00.1 output:hdmi-stereo-extra2
pactl set-sink-volume @DEFAULT_SINK@ 50%
# obtain ports: pactl list
@yoyosan
yoyosan / covid-19-vaccines-reactions.md
Last active August 23, 2021 05:02
COVID 19 Vaccines Reactions
@yoyosan
yoyosan / swap.md
Last active March 28, 2022 11:05
Enabling swap on Scaleway or any other VPS

It seems all new scaleway servers are created without swap. For people, like me who want to use some, there is the easy way (ex. is for 8Go) :

sudo dd if=/dev/zero of=/swap bs=1024 count=8388608
sudo chmod 0600 /swap
sudo mkswap /swap
sudo swapon /swap
free -h
@yoyosan
yoyosan / ssl-renew.md
Last active June 30, 2022 10:54
Renew SSL certificate for yolosan.xyz in True NAS

For Nextcloud

Log into NAS ssh:

iocage console nextcloud
pkg install py38-certbot py38-certbot-nginx
certbot renew --nginx
service nginx restart