Skip to content

Instantly share code, notes, and snippets.

@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>
@mpalourdio
mpalourdio / app.component.html
Last active February 3, 2025 14:50
ng-http-loader - Custom component
<router-outlet></router-outlet>
<ng-http-loader [entryComponent]="awesomeComponent" ></ng-http-loader>
git config --global alias.plog "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@mpalourdio
mpalourdio / gist:790c2604e244dc934612
Last active February 19, 2025 12:19
GIT - convert lightweight tag to annotated tag
git checkout lightweight
git tag -d lightweight
GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" git tag annotated -m 'lightweight to annotated'
git push origin :refs/tags/lightweight
git push --tags
@mpalourdio
mpalourdio / github.sh
Last active February 3, 2025 14:45
Rewrite GIT history with a new email address
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then