Skip to content

Instantly share code, notes, and snippets.

@cheiff
cheiff / self-signed.sh
Last active August 4, 2022 22:06
Generate self-signed ssl cert in one command - no passphrase
openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.cert -sha256 -days 3650 -nodes -subj '/CN=localhost'
@cheiff
cheiff / docker.sh
Created May 25, 2020 11:33
Install docker
# From https://docs.docker.com/engine/install/ubuntu/
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository -y \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
<?php
/**
* Command-line extension installer. This file is meant to be copied into your Joomla! 3 site's cli directory.
*/
// Define ourselves as a parent file
define('_JEXEC', 1);
// Required by the CMS [67/49428]
define('DS', DIRECTORY_SEPARATOR);
<?php
/**
* @package Joomla
* @subpackage tests
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
class UserCest
{
@cheiff
cheiff / gist:1e6ba2ee6378292de28d
Created October 14, 2015 09:56 — forked from vxnick/gist:380904
Array of country codes (ISO 3166-1 alpha-2) and corresponding names
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',