Skip to content

Instantly share code, notes, and snippets.

View pepperstreet's full-sized avatar

pepperstreet pepperstreet

View GitHub Profile
@codeadamca
codeadamca / mamp-upgrading-phpmyadmin.md
Last active January 16, 2023 04:35
mamp-upgrading-phpmyadmin.md

Updating phpMyAdmin in MAMP

When using MAMP, you may want to upgrade the version of phpMyAdmin. Or for example, after upgrading my MAMP version of PHP, phpMyAdmin started display a lot of PHP warnings.

phpmyadmin

These are the steps to upgrade phpMyAdmin:

  1. Download the dsired version of phpMyAdmin.
@codeadamca
codeadamca / mamp-php-versions.md
Last active June 25, 2024 13:16
How to add new PHP versions to MAMP on a Mac

Adding Versions of PHP to MAMP on a Mac

If you're working on a project that requires a version of PHP higher than the versions that MAMP comes with, you can easily add additional verions.

My version of MAMP came installed with PHP 7.4.21 and 8.0.8. I'm attempting to use MAMP to host a Laravel application which requires at least PHP 8.1.

The version of PHP MAMP uses is often different than the version you have installed. I have installed PHP using Brew. I'm currently running PHP 8.1.8. If you want to check your installed version of PHP, use the terminal and run the following command:

php --version

Using Bootstrap in Joomla 4

Joomla 4 introduces a modular approach for interactive components

  • What is a modular approach?
  • The functionality is broken down into individual components, files. There is no one file approach as it was with Bootstrap in Joomla 3. This was done for efficiency and performance gains (send only the code that is needed instead of delivering everything in case some page will need so component).

How to deal with Interactive components

  • Load what you need per case! There are helper functions that will help you achieve this and, it is dead easy just call the function with the appropriate arguments.
@alexandreelise
alexandreelise / htmlhelper-select-options-with-empty-default.php
Created September 26, 2020 01:03
Code snippet for HTMLHelper select options with empty default value
<label for="demo">Demo</label>
<select id="demo" name="demo">
<?php array_unshift($this->myExampleOptionsArray, null); ?>
<?php echo HTMLHelper::_('select.options', $this->myExampleOptionsArray, 'value', 'text', $this->selectedOptionValue ?? '');?>
</select>
@nukadelic
nukadelic / EditorFontSize.cs
Last active July 4, 2024 11:42
Unity Editor Font Size Changer -- EditorStyles
#if UNITY_EDITOR
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Reflection;
public class EditorFontSize : EditorWindow
{
// enable resize on launch to set a default font size , using this option will disable the ability to have the window accassible
@alexandreelise
alexandreelise / add-custom-fields-to-core-modules-j3x.php
Created November 26, 2019 09:23
Add custom fields to core modules in Joomla! 3
<?php
defined('_JEXEC') or die;
?>
<div class="latestnews">
<ul class="list-group list-group-flush">
<?php foreach ($list as $item) : $image = json_decode($item->images); ?>
<?php
// most important part
// context:
// for articles: com_content.article
@ditzel
ditzel / MeshDestroy.cs
Created August 19, 2019 19:02
MeshDestroy => Put it on a game object with a mesh filter and renderer. Make sure to have read/write enabled on fbx import
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MeshDestroy : MonoBehaviour
{
private bool edgeSet = false;
private Vector3 edgeVertex = Vector3.zero;
private Vector2 edgeUV = Vector2.zero;

Improving heat management after macbookpro 2011 discrete GPU fix, also a script to automate part of the fix process

Taken from StackExchange

Thanks to LangLangC

NOTE: This is experimental; works for some people, not for others

Improved thermal and power management

@jlainezs
jlainezs / basicformfieldlist.php
Last active April 21, 2022 01:37
Joomla 3.X custom field which implements chained dropdown controls with ajax autocomplete capabilities.
<?php
/**
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @author Pep Lainez <jlainezs@cloudconceptes.com>
* @copyright Copyright (C) 2018 CloudConceptes
* @license GNU/GPL https://www.gnu.org/licenses/gpl-3.0.html
*/
defined('JPATH_PLATFORM') or die;