Skip to content

Instantly share code, notes, and snippets.

@sarim
sarim / README.md
Created December 30, 2022 22:31
mysql podman container as systemd service

mysql podman container as systemd service

compose file initially run by podman-compose to create first container. Might need to run with --initialize first time to init the datadir directory structure. systemd unit file generated by podman generate systemd mysql5 --new. Then edited ExecStartPre.

setting socket path in /etc/mysql/conf.d/mysql.cnf needed for default mysql client command. Custom mysql setting like tuning cache size etc.. can be put into customconf dir.

[05:55:35] [main/INFO]: Loading Minecraft 1.19 with Fabric Loader 0.14.7
[05:55:35] [ForkJoinPool-1-worker-4/WARN]: Mod fabrishot uses the version ${version} which isn't compatible with Loader's extended semantic version format (Could not parse version number component '${version}'!), SemVer is recommended for reliably evaluating dependencies and prioritizing newer version
[05:55:36] [main/INFO]: Dependencies overridden for borderlessmining, farsight, morechathistory, fabric, dcch, colormatic, ferritecore, debugify
[05:55:36] [main/WARN]: Warnings were found!
- Mod 'Colormatic' (colormatic) 3.1.2+mc.1.19 recommends any version of quilt_loader, which is missing!
- You should install any version of quilt_loader for the optimal experience.
- Mod 'Colormatic' (colormatic) 3.1.2+mc.1.19 recommends any version between 3.0.0 (inclusive) and 4- (exclusive) of mod 'Mod Menu' (modmenu), but only the wrong version is present: 4.0.0!
- You should install any version between 3.0.0 (inclusive) and 4- (exclusive) o
@sarim
sarim / main.php
Created January 3, 2022 21:42
SEGFAULT with symfony cache + http-client in php8.1+symfony6. Works fine in php7.4/symfony5.4
<?php
// composer require symfony/cache
// composer require symfony/http-client
// rm -rf /tmp/symfony-cache/
// php main.php
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\HttpClient\NativeHttpClient;
@sarim
sarim / settings.json
Created June 6, 2021 14:55
vscode settings.json
{
"php-cs-fixer.rules": {
"@Symfony": true,
"@DoctrineAnnotation": true,
"array_indentation": true,
"native_function_invocation": true,
"psr_autoloading": true,
"doctrine_annotation_braces": {"syntax" : "with_braces"},
"method_argument_space": {"ensure_fully_multiline" : true}
},
@sarim
sarim / MonsterMessages.go
Created December 23, 2020 01:01
Adventofcode 2020.19
package main
import (
"bufio"
"fmt"
"os"
"regexp"
"strconv"
"strings"
"time"
@sarim
sarim / kernel-panel-driver-overlay-vga.patch
Created June 2, 2020 16:35
RPI3 kernel-panel-driver-overlay-vga.patch
diff --git a/arch/arm/boot/dts/overlays/vc4-kms-gittu-hdmi-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-gittu-hdmi-overlay.dts
new file mode 100644
index 000000000..9fa4159e2
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/vc4-kms-gittu-hdmi-overlay.dts
@@ -0,0 +1,63 @@
+/*
+ * vc4-kms-v3d-overlay.dts
+ */
+
~/ibus-avro➤ aclocal && autoconf && automake --add-missing
configure.ac:6: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated. For more info, see:
configure.ac:6: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
~/ibus-avro➤ ./configure --prefix=/opt/gittu/avrotest
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
{
"explorer.openEditors.visible": 0,
"editor.wordWrap": "on",
"editor.renderIndentGuides": false,
"window.openFilesInNewWindow": "off",
"editor.minimap.enabled": false,
"workbench.sideBar.location": "right",
"window.titleBarStyle": "custom",
"remote.onstartup": true,
"editor.fontSize": 20,
@sarim
sarim / .bash_profile
Created December 16, 2017 09:16
supercharge your youtube-dl
yt-dl() {
youtube-dl --external-downloader=aria2c --external-downloader-args="--download-result=hide" $@
}
yt-dl-q() {
cat $1 | xargs -I {} bash -l -c "yt-dl {};"
}
1080p() {
yt-dl -f 137+140 $1
<table>
<tbody>
<tr>
<td><img src="http://dyncdn.me/static/over/156dc9f0d7d05e610850b6ac60e0a157fbcfa8f6.jpg" border=0></td>
<td>UFC.208.PPV.HDTV.x264-PLUTONiUM[rartv]</td>
<td>2017-02-12 09:29:11 +0000 UTC</td>
</tr>
<tr>