Skip to content

Instantly share code, notes, and snippets.

View ademers's full-sized avatar
🧡

Andrea ademers

🧡
View GitHub Profile
{
"user": [
{
"username": "usernameone",
"email": "[email protected]"
},
{
"username": "usernametwo",
"email": "[email protected]"
}
This file has been truncated, but you can view the full file.
2017/07/20 13:02:56 [info] [application] $_GET=array (
'p' => 'admin/utils/logs',
)
$_COOKIE=array (
'YII_CSRF_TOKEN' => 'd72f87b4a861656641fe202dce080b5636eebdc7s:81:"QGCbSdxW5rEMR6TvLv~StDstl8ahOX_kwdxoR4D5|61fef96f779c2e68c52baa45c55ff3a04eed5799";',
'aec65fa07f69a723666179aac399e3dcusername' => 'fa4484264bc5847c4145e65b68e6612e8900d7ffs:60:"c5b804b08a56813e98bee4a4e2a20dc3efb40205czo3OiJhbmRyZWFkIjs=";',
'CraftSessionId' => '0065bdbe3ea6e77e3f47abe306fb1f45',
'aec65fa07f69a723666179aac399e3dc' => '50eb269f5b5017828e76c92c2086b97319dc5a73s:400:"1d7c0bb62a3dabbadd136e2a603b5b952b4499d7YTo2OntpOjA7czo3OiJhbmRyZWFkIjtpOjE7czozMjoiZksyZXBXQXVGUHJzV0gyaWQyaTVrbDVYanFKaTFVNXYiO2k6MjtzOjM2OiIzNTM2NTZmNi1hOTkzLTQ5MTEtODVjYi0xYjUzMzY2MmVmZTkiO2k6MztpOjE7aTo0O3M6MTIxOiJNb3ppbGxhLzUuMCAoTWFjaW50b3NoOyBJbnRlbCBNYWMgT1MgWCAxMF8xMV82KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvNTkuMC4zMDcxLjExNSBTYWZhcmkvNTM3LjM2IjtpOjU7YTowOnt9fQ==";',
)
@ademers
ademers / export.php
Last active July 20, 2018 15:54 — forked from engram-design/export.php
ExpressionEngine PHP Export into JSON: Members by group
<?php
$group = $_GET['id'];
$content = array();
$entries_query = $this->EE->db->query("SELECT * FROM exp_members WHERE exp_members.group_id = '$group'");
foreach ($entries_query->result_array() as $id => $row) {
$content[$id] = array();
// Remove spaces from EE usernames
<?php
$channel = $_GET['channel'];
$content = array();
$entries_query = $this->EE->db->query("SELECT * FROM exp_comments AS comments LEFT JOIN exp_channel_titles AS titles ON comments.entry_id = titles.entry_id LEFT JOIN exp_members m ON m.member_id = comments.author_id WHERE comments.status = 'o' AND titles.status = 'open' AND comments.channel_id = '$channel'");
foreach ($entries_query->result_array() as $id => $row) {
$content[$id] = array();
$content[$id]['comment'] = $row['comment'];
actor: Tester
paths:
tests: tests
log: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
settings:
bootstrap: _bootstrap.php
params:
<?php
use craft\test\TestSetup;
ini_set('date.timezone', 'UTC');
// Use the current installation of Craft
define('CRAFT_STORAGE_PATH', __DIR__ . '/_craft/storage');
define('CRAFT_TEMPLATES_PATH', __DIR__ . '/_craft/templates');
define('CRAFT_CONFIG_PATH', __DIR__ . '/_craft/config');
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Contact Form Plugin Example with Axios</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.js"></script>
</head>
<body>
<!--

How I Update Craft CMS 3.5.x and Craft CMS Plugins

⏳ 2 min read.

Update apnea: the temporary cessation of breath when updating Craft and Craft plugins.

This article describes the steps I follow to update Craft 3.5.x and plugins in a stress-free and reliable manner. 🧘

Photo of blue and pink sea by Harli Marten Photo by Harli Marten on Unsplash

@ademers
ademers / app.php
Last active December 5, 2020 17:58
<?php
/**
* Yii Application Config
*
* Edit this file at your own risk!
*
* The array returned by this file will get merged with
* vendor/craftcms/cms/src/config/app.php and app.[web|console].php, when
* Craft's bootstrap script is defining the configuration for the entire
* application.
@ademers
ademers / craft-cms-postmark-mailer-component.php
Last active March 29, 2023 10:51
Craft CMS Postmark Mailer Component
<?php
return [
'components' => [
'mailer' => function() {
// Get the stored email settings
$settings = craft\helpers\App::mailSettings();
// Override the transport adapter class
$settings->transportType = craft\postmark\Adapter::class;