Skip to content

Instantly share code, notes, and snippets.

@cheiff
cheiff / .cursorrules
Created June 4, 2025 16:54 — forked from boxabirds/.cursorrules
Rock solid: turn Cursor into a rock-solid software engineering companion
# Project Policy
This policy provides a single, authoritative, and machine-readable source of truth for AI coding agents and humans, ensuring that all work is governed by clear, unambiguous rules and workflows. It aims to eliminate ambiguity, reduce supervision needs, and facilitate automation while maintaining accountability and compliance with best practices.
# 1. Introduction
> Rationale: Sets the context, actors, and compliance requirements for the policy, ensuring all participants understand their roles and responsibilities.
## 1.1 Actors
@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',