Skip to content

Instantly share code, notes, and snippets.

View othercodes's full-sized avatar
🚀
Everything is about the context.

Unay Santisteban othercodes

🚀
Everything is about the context.
View GitHub Profile
@othercodes
othercodes / UUID.php
Created March 2, 2016 12:03 — forked from dahnielson/UUID.php
Pure PHP UUID generator
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
@othercodes
othercodes / authenticate.php
Created March 13, 2017 07:44
External script to authenticate using Joomla!
<?php
/**
* Joomla! External authentication script
* @author usantisteban <usantisteban@othercode.es>
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
if (version_compare(PHP_VERSION, '5.3.1', '<')) {
@othercodes
othercodes / cat.php
Last active July 23, 2017 21:39
External cat image dispatcher using joomla libraries, just place this in any Joomla root path and access to /cat.php, infinite cat pictures!!
<?php
/**
* Joomla! External cat dispatcher
* @author usantisteban <usantisteban@othercode.es>
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
if (version_compare(PHP_VERSION, '5.3.1', '<')) {
die('Your host needs to use PHP 5.3.1 or higher to run this version of Joomla!');
@othercodes
othercodes / _skewangled.scss
Created July 28, 2017 10:25
Skew Angled Showcase Particle for Gantry 5, CSS effects by stefen (https://codepen.io/stefen/pen/bZJodV)
.skewangled {
background: #000;
color: #fff;
padding: 2em;
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
@othercodes
othercodes / postmaninstaller.sh
Last active August 10, 2018 06:27
Small script to install and update Postman in Ubuntu
#!/usr/bin/env bash
echo "Downloading lastest Postman version..."
wget https://dl.pstmn.io/download/latest/linux64 -O /tmp/postman.tar.gz
echo "Installing..."
sudo tar -xzf /tmp/postman.tar.gz -C /opt
rm /tmp/postman.tar.gz
echo "done!"
if [ ! -f /usr/bin/postman ]; then
@othercodes
othercodes / phpremiinstaller.sh
Last active November 6, 2018 14:22
Install all PHP versions and some extensions + the IonCube Loaders for each version of PHP from Remi repositories
#!/usr/bin/env bash
# PHP Installer (REMI)
#
# Install all PHP versions and some extensions, it also install
# the IonCube Loaders for each version of PHP.
#
# Tested on CentOS Linux release 7.5.1804 (Core)
#
# Execution:
@othercodes
othercodes / NotLoadEjaxOnPhone.js
Created December 23, 2018 10:40
If statement to load enllax on not phone/tablet.
if (!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
jQuery(window).enllax();
}
@othercodes
othercodes / config.json
Created March 17, 2019 09:48 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@othercodes
othercodes / phpswitch.sh
Last active April 15, 2019 08:23
Small script to display dialog to switch between PHP version.
#!/usr/bin/env bash
#
# Small script to display dialog to switch between PHP verion.
# Tested on Ubuntu 16.04 LTS
#
# Execution:
# $ sudo ./phpswitch.sh
#
# You can also create a softlink to the /usr/bin directory
# $ sudo ln -s ~/phpswitcher.sh /usr/bin/phpswitch
@othercodes
othercodes / linkler.sh
Created May 14, 2019 06:53
Migration link generator. Ubuntu
#!/usr/bin/env bash
#
# LINKLER: Migration link generator
#=========================================================
# ██╗ ██╗███╗ ██╗██╗ ██╗██╗ ███████╗██████╗
# ██║ ██║████╗ ██║██║ ██╔╝██║ ██╔════╝██╔══██╗
# ██║ ██║██╔██╗ ██║█████╔╝ ██║ █████╗ ██████╔╝
# ██║ ██║██║╚██╗██║██╔═██╗ ██║ ██╔══╝ ██╔══██╗
# ███████╗██║██║ ╚████║██║ ██╗███████╗███████╗██║ ██║
# ╚══════╝╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝