Skip to content

Instantly share code, notes, and snippets.

View Llewellynvdm's full-sized avatar
🏗️
Working on Joomla Component Builder

<<eWɘ>>yn Llewellynvdm

🏗️
Working on Joomla Component Builder
View GitHub Profile
@Llewellynvdm
Llewellynvdm / getBiblejQueryScript
Last active July 22, 2023 11:15
Here is a jQuery script to make an API call from your own application
jQuery.ajax({
url:'https://archived.getbible.net/json',
dataType: 'jsonp',
data: 'p=John1&v=kjv',
jsonp: 'getbible',
success:function(json){
// set text direction
if (json.direction == 'RTL'){
var direction = 'rtl';
} else {
@Llewellynvdm
Llewellynvdm / .gitignore
Last active May 30, 2022 13:49 — forked from mrkmg/file_extension_to_mimetype.php
File Extension to Mimetype
.idea
@Llewellynvdm
Llewellynvdm / buildPDF.method
Last active April 2, 2022 17:52
pdf table templete
/**
* @return bool
*/
protected function buildPDF()
{
if(class_exists('TCPDF'))
{
$template = $this->getTemplate('pdf.html'); // your function to get the html table
// convert product object to placeholders
$placeholders = array();
@Llewellynvdm
Llewellynvdm / display.js
Last active February 3, 2022 16:46
Upload Script
// see if we have a banner
<?php if (isset($this->item->banner) && [[[Component]]]Helper::checkString($this->item->banner)) : ?>
jQuery('<img src="<?php echo $this->item->banner; ?>" class="your-class-banner" alt="banner">').insertAfter(jQuery('#jform_banner').closest('.control-group'));
<?php endif; ?>
@Llewellynvdm
Llewellynvdm / getDynamicContent.php
Last active January 10, 2022 17:38
Little dynamic content script of JCB
/**
* The array of dynamic content
*
* @var array
*/
protected static $dynamicContent = array(
// The banners by size (width - height)
'banner' => array(
'728-90' => array(
@Llewellynvdm
Llewellynvdm / DB_generator_ALL.php
Created December 5, 2021 02:40
Generate Transportation SQL data
<?php
function randomLetter($size)
{
$bag = "A BC DEF G HIJKLL MNOP QRS TUV W XUZ ";
$key = array();
$bagsize = strlen($bag) - 1;
for ($i = 0; $i < $size; $i++)
{
$get = rand(0, $bagsize);
@Llewellynvdm
Llewellynvdm / .bash_prompt.sh
Last active August 24, 2021 07:02
Pretty Colored Bash Prompt
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
@Llewellynvdm
Llewellynvdm / Apache-proxy-setup.md
Last active July 31, 2021 09:45
Easy Joomla! 3.9.27 Docker Composer File

Apache Proxy Setup Instructions for Ubuntu 20.04

First Upate System:

$ sudo apt update
$ sudo apt upgrade -y

Install Apache:

@Llewellynvdm
Llewellynvdm / vdmInstallExtension.php
Last active October 30, 2020 04:00
Install Extension (via CLI) for Joomla 3.9
<?php
/**
* @package VDM Install Extension (via CLI)
*
* @author Llewellyn van der Merwe <https://www.vdm.io>
* @gitHub https://gist.github.com/Llewellynvdm/fb2a8bcd24c42a955b67ec3154aa7b54
* @copyright Copyright (C) 2020 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later
*/
@Llewellynvdm
Llewellynvdm / CollegeSystem.sql
Created June 17, 2020 04:08
Students at XYZ College
USE [CollegeSystem]
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Students](
[ID] [int] IDENTITY(1,1) NOT NULL,