Skip to content

Instantly share code, notes, and snippets.

@mpalourdio
mpalourdio / gist:0c1380acb45a6c2fa6bf90c37586f589
Created August 17, 2023 13:09 — forked from rb2k/gist:8372402
A jenkins script to clean up workspaces on slaves
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
for (node in Jenkins.instance.nodes) {
@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

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

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 / php-cs-fixer
Created November 12, 2014 21:24
@fabpot php-cs-fixer config for PhpStorm
parameters
--level=psr2 --verbose fix $FileDir$/$FileName$
working directory
$ProjectFileDir$
@mpalourdio
mpalourdio / Proxy.php
Last active February 17, 2016 16:52
handling composite keys
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY