Skip to content

Instantly share code, notes, and snippets.

@mpalourdio
mpalourdio / README.md
Created March 7, 2025 12:28
Cleanup recursively all node_modules in a specific folder
cd myTooBigFolderToBackup
find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;
@mpalourdio
mpalourdio / README.md
Last active February 17, 2025 20:15
Supertypes of the following classes cannot be resolved - WTF Intellij

If for some random reasons, after a JDK update from SDKman, all kotlin projects fail to compile/run in Intellij, double check that the JDK has the correct path in ~/.config/JetBrains/IntelliJIdeaXXXX.x/options/jdk.table

  • shutdown intellij
  • Edit this file with the correct path
  • Enjoy
@mpalourdio
mpalourdio / README.md
Last active February 13, 2025 15:27
Disable chrome/chromium microphone input level auto-adjustment

chrome://flags/#enable-webrtc-allow-input-volume-adjustment

@mpalourdio
mpalourdio / XorCsrfRequestPostProcessor.java
Last active February 18, 2025 12:20
Spring Security : MockMvc tests with XorCsrfTokenRequestAttributeHandler - Custom RequestPostProcessor
package xx.xx.xxxxxxx.xxxxxxx.requestpostprocessor;
import jakarta.servlet.http.Cookie;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.test.web.support.WebTestUtils;
import org.springframework.test.web.servlet.request.RequestPostProcessor;
public final class XorCsrfRequestPostProcessor implements RequestPostProcessor {
@mpalourdio
mpalourdio / default.conf
Last active February 3, 2025 14:43
From sonatype nexus to npmjs audit
server {
listen 8080;
server_name localhost;
location ~ ^/repository/npm-group/-/npm/(.*)$ {
return 307 https://registry.npmjs.org/-/npm/$1;
}
}
@mpalourdio
mpalourdio / gist:26e8ada1d325573859678735b6bb96fc
Created May 30, 2022 06:42
Xandr - dual screen mouse flickering
xrandr --output DP-1-1 --scale 0.9999x0.9999
@mpalourdio
mpalourdio / autostart.sh
Last active May 21, 2022 10:25 — forked from ohnotnow/autostart.sh
Disabling wifi power management on rpi3/libreelec
# from : https://forum.libreelec.tv/thread/5074-wifi-issues-on-rpi-3-poor-speed-and-latency-solution/#codeLine_1_3e8919
# first install the 'network tools' add-on from the kodi repository then create a /storage/.config/autostart.sh file with
# this as the contents.
# then reboot the pi. runnning 'iwconfig' should now show the power-management as being off.
# mpalourdio : in LE 9+, iw is already installed at /usr/sbin/iw
# just create an autostart.sh and add :
/usr/sbin/iw wlan0 set power_save off
@mpalourdio
mpalourdio / clearpihole
Created May 14, 2022 08:10
clear pihole history
#!/bin/bash
set -x
service pihole-FTL stop
rm /etc/pihole/pihole-FTL.db
rm /var/log/pihole*
service pihole-FTL start

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@mpalourdio
mpalourdio / app.component.html
Last active February 3, 2025 14:49
ng-http-loader - Angular Material Integration example
<router-outlet></router-outlet>
<ng-http-loader [entryComponent]="matSpinner"></ng-http-loader>