Skip to content

Instantly share code, notes, and snippets.

View joho1968's full-sized avatar
🐒
Converting caffeine to code

Joaquim Homrighausen joho1968

🐒
Converting caffeine to code
  • WebbPlatsen i Sverige AB
  • Sweden
View GitHub Profile
@joho1968
joho1968 / phpmberegpasswd.php
Created March 19, 2024 09:58
Simple password validator for PHP using mb_ereg_match()
<?php
/*
* Simple password construct validator for PHP
* This code uses mb_ereg_match()
* Joaquim Homrighausen <joho@webbplatsen.se>
* Mar 19, 2024
*
* Do whatever you want with this snippet :)
*
* This may not necessarily agree with the section "Strength of Memorized
@joho1968
joho1968 / check-iptables.sh
Created September 16, 2021 07:54
Simple (bash) script to check the number of iptables rules for Linux
#!/bin/bash
#
# Simple (bash) script to check the number of iptables rules for Linux
#
# You could run this at system start (possibly after a few second delay) or
# as a cron job every minute or so. On any given system, it's probably not
# a normal situation that there exist no (zero) iptables rules.
#
@joho1968
joho1968 / raidcheck.sh
Created December 15, 2020 08:22
Checking LSI RAID storage status in Linux
#!/bin/bash
#
# Check LSI RAID storage status
#
# This will trigger on the output NOT being "Optl" (Optimal). This works for me,
# your mileage may vary. One problem in using more "verbose output" from the
# storcli64 binary is that it always (?) outputs some sort of legend with all
# the various status types explained, so it always contains the text "Degraded"
# for example. This minor script will simply search for what we want, which is
# a RAID in optimal state, and if NOT found, perform a full status scan and send
@joho1968
joho1968 / lightbox_bs4_jq.txt
Created May 31, 2019 05:29
Lightbox for Bootstrap 4 and jQuery
===
Lightbox (or "image preview") functionality for Bootstrap 4 without additional
libraries (apart from jQuery).
Written by Joaquim Homrighausen <joho@webbplatsen.se>, 30-May-2019
TEAMYUJO
Do as you wish with this :)
@joho1968
joho1968 / phpvalpasswd.php
Created May 30, 2019 09:03
Simple password construct validator for PHP
<?php
/*
* Simple password construct validator for PHP
* Joaquim Homrighausen <joho@webbplatsen.se>
* May 30, 2019
* TEAMYUJO
*
* Do whatever you want with this snippet :)
*
* This may not necessarily agree with the section

Keybase proof

I hereby claim:

  • I am joho1968 on github.
  • I am joho68 (https://keybase.io/joho68) on keybase.
  • I have a public key ASBbIqG_j7yrEMW1xdCGPXBbklWYr4iaQBamRPiLilAdugo

To claim this, I am signing this object: