Skip to content

Instantly share code, notes, and snippets.

View muffycompo's full-sized avatar

Mfawa Alfred Onen muffycompo

View GitHub Profile
@muffycompo
muffycompo / README.MD
Created July 10, 2022 13:00 — forked from rama-adi/README.MD
Use hCaptcha with any livewire component

Implement hCaptcha with Livewire Component

This is a simple way to implement hCaptcha with Livewire component.

NOTE: please read this carefully, and adjust variable names, etc to your use case

Setup

Before using this implementation, add their JS library first on your page

<script src="https://js.hcaptcha.com/1/api.js?hl=en" async defer></script>
@muffycompo
muffycompo / server_certificates_to_pem.md
Created October 10, 2018 14:42 — forked from stevenhaddox/server_certificates_to_pem.md
Convert .crt & .key files into .pem file for HTTParty

Two ways to do it, but only worked for me so I'll put it first and the second for reference:

$ openssl pkcs12 -export -in hostname.crt -inkey hsotname.key -out hostname.p12
$ openssl pkcs12 -in hostname.p12 -nodes -out hostname.pem

Other options for this method in comments below:

# Note, the -certfile root.crt appends all CA certs to the export, I've never needed these so it's optional for my personal steps
$ openssl pkcs12 -export -in hostname.crt -inkey hsotname.key -certfile root.crt -out hostname.p12

Note, I've always had my hostname.crt as part of my .pem, so I keep my certs but apparently you may not have to, hence the nocerts flag being an extra option in this sample

@muffycompo
muffycompo / Netfilter-IPTables-Diagrams.md
Created June 10, 2018 08:41 — forked from nerdalert/Netfilter-IPTables-Diagrams.md
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

#!/usr/bin/bash
#title :mkuser.sh
#description :This script will make random password for root, new user, new user as sudo, clear history
#author :Trle94 @ Castlegem SRL
#date :03.04.2018
#version :0.1
#usage :./mkuser.sh
#--------------------------------------------------------------------------------
[ $EUID -eq 0 ] || { echo "This script needs to be ran with SUDO!"; exit 1; }
#!/bin/bash
USER="root"
PASSWORD=""
FILES="/Users/tenold/Backups/MySQL/*"
for f in $FILES
do
echo "Processing $f file..."
START_CHILLI=0
CONFFILE="/etc/chilli.conf"
HS_USER="chilli"
#! /bin/sh
### BEGIN INIT INFO
# Provides: chilli
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start CoovaChilli daemon at boot time
# Description: Enable CoovaChilli service provided by daemon.
### END INIT INFO
#!/bin/sh
#
# chilli - CoovaChilli
#
# chkconfig: 2345 65 35
# description: CoovaChilli
# Source function library.
. /etc/chilli/functions
. /lib/lsb/init-functions
@muffycompo
muffycompo / Keybase.md
Created March 13, 2017 20:24
Keybase proof

Keybase proof

I hereby claim:

  • I am muffycompo on github.
  • I am muffycompoqm (https://keybase.io/muffycompoqm) on keybase.
  • I have a public key ASCGpd9St3Rok3b7qV1oKDssp9-IZmM_N8ze-8XkabKAbgo

To claim this, I am signing this object:

apt-get update
apt-get install -y g++ automake autoconf libtool libltdl-dev gengetopt make cmake libssl-dev libjson-c2 libjson-c-dev
git clone https://github.com/coova/coova-chilli
./bootstrap
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info \
--sysconfdir=/etc --localstatedir=/var --enable-largelimits \