Skip to content

Instantly share code, notes, and snippets.

View ronniengoda's full-sized avatar
🤓
Talk is cheap show me the CODE

Ronald Ngoda ronniengoda

🤓
Talk is cheap show me the CODE
View GitHub Profile
@ronniengoda
ronniengoda / font_changer_tool.php
Last active November 14, 2023 13:35
AdminLTE Plugin For Appgini: Font Changer Tool
<!-- Write your custom page content in here, it could be anything and everything, you can also use AppginiLTE widget functions here-->
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.1.0-rc.0/css/select2.min.css" rel="stylesheet" />
<style> .select2-selection { height: 36px !important; } </style>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">App Font Changer Tool</h3>
</div>
<div class="card-body">
@ronniengoda
ronniengoda / send_email_attachment.php
Last active November 6, 2023 10:36
Send Email Attachment AppginiLTE Plugin For Appgini
<?php
//this code to be placed inside the hooks/_global.php file the function aleady exists just copy the body
function sendmail_handler(&$pm)
{
// Access the 'tag' array
$tag = $pm->tag;
// Check if 'tag' is an array and has non-empty 'attachment_path'
if (is_array($tag) && !empty($tag['attachment_path'])) {
// Access 'attachment_path' and 'attachment_name'
$attachment_path=explode(',',$tag['attachment_path']);
@ronniengoda
ronniengoda / filemanager.php
Last active October 15, 2023 07:54
File Manager Application for AdminLTE for Appgini
<!-- Write your custom page content in here, it could be anything and everything, you can also use AppginiLTE widget functions here-->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">File Manager App</h3>
</div>
<div class="card-body">
<!-- upload button -->
<div class="row">
@ronniengoda
ronniengoda / auth_customizer.php
Created September 21, 2023 10:57
AdminLTE For Appgini Auth Pages Customizer
<!-- Write your custom page content in here, it could be anything and everything, you can also use AppginiLTE widget functions here-->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Customize Your Login And Register Pages</h3>
</div>
<div class="card-body">
<ul class="nav nav-tabs" id="custom-content-below-tab" role="tablist">
<li class="nav-item">
@ronniengoda
ronniengoda / permissionscopy.php
Created July 19, 2023 07:50
Appgini Group Permissions Copier
<!-- Write your custom page content in here, it could be anything and everything, you can also use AppginiLTE widget functions here-->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Duplicate Group Permissions From One Goup To Another</h3>
</div>
<div class="card-body">
<form method="POST" action="">
<div class="row">
@ronniengoda
ronniengoda / shopifybutton.html
Last active October 20, 2023 08:16
Shopify MPESA payment button on order status page additional scripts-PAY HERO KENYA
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Show the loading message using SweetAlert2
Swal.fire({
title: 'Loading...',
text: 'Please wait while we check the status of your payment.',
allowEscapeKey: false,
allowOutsideClick: false,
@ronniengoda
ronniengoda / newversionuploader.php
Last active March 14, 2023 18:33
New Version Uploader Tool
<!-- Write your custom page content in here, it could be anything and everything, you can also use AppginiLTE widget functions here-->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">New Version Uploader Tool</h3>
</div>
<div class="card-body">
<?php $post_max_size = ini_get('post_max_size'); $upload_max_filesize = ini_get('upload_max_filesize'); echo showAlert('info','Upload File Size','Ensure your php ini configurations for: <b>post_max_size</b> is set to <b>100M</b> atleast and <b>upload_max_filesize</b> is set to <b>100M</b> at least for this tool to work.<br> Your current configuration is: <br>post_max_size: ' . $post_max_size . '<br>upload_max_filesize: ' . $upload_max_filesize . ''); ?>
<form action="" method="POST" enctype="multipart/form-data">
@ronniengoda
ronniengoda / processchat.php
Last active March 14, 2023 09:17
CHAT GPT PROCESSOR SCRIPT
<?php
if (isset($_POST['content'])) {
//DEFINE YOUR OPEN AI CHAT API PARAMETERS HERE. API reerence: https://platform.openai.com/docs/api-reference/chat/create
$max_tokens = 4000; //The maximum number of tokens allowed for the generated answer. By default, the number of tokens the model can return will be (4096 - prompt tokens).
$n = 1; //How many chat completion choices to generate for each input message.
$temperature = 1.0; //What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.We generally recommend altering this or top_p but not both.
$model = "gpt-3.5-turbo-0301"; //ID of the model to use. Currently, only gpt-3.5-turbo and gpt-3.5-turbo-0301 are supported.
$frequency_penalty = 0; //Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
$
@ronniengoda
ronniengoda / chatgpt.php
Last active March 14, 2023 09:29
Chat GPT Tool
<!-- Write your custom page content in here, it could be anything and everything, you can also use AppginiLTE widget functions here-->
<?php
$processing_page_id = ""; //Provide the page ID of the processor script;
?>
<div class="row">
<div class="col-md-12">
<div class="card card-primary direct-chat direct-chat-primary">
<div class="card-header">
<style> .spinit { animation: spin 1s infinite linear; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } </style>
<h3 class="card-title">ChatGPT Tool</h3>
@ronniengoda
ronniengoda / jsondatabase.php
Last active March 14, 2023 09:12
JSON DB TOOL
<!-- Write your custom page content in here, it could be anything and everything, you can also use AppginiLTE widget functions here-->
<div class="row">
<div class="col-md-12">
<div class="card card-primary">
<div class="card-header">
<h3 class="card-title">App JSON Database (Read Only)</h3>
</div>
<div class="card-body">
<table class="table table-hover">
<tbody>