Skip to content

Instantly share code, notes, and snippets.

Avatar

Chad Windnagle drmmr763

View GitHub Profile
View hubspot.php
<?php
$query = array(
'refresh_token' => 'xxx', // $this->keys['refresh_token'],
'client_id' => 'yyy', //$this->keys[$this->getClientIdKey()],
'grant_type' => 'refresh_token',
);
$url = 'https://api.hubapi.com/auth/v1/refresh?' . http_build_query($query);
$ch = curl_init();
View login.php
<?php
try {
$app->post('/login', function () use ($app, $userModel) {
if ( ! $userModel->login($_POST['username'], $_POST['password'])===true){
throw new \Exception('Login failed, please check username/password and try again');
}
$app->redirect('/');
});
} catch (\Exception $e) {
@drmmr763
drmmr763 / integrate.md
Last active Sep 3, 2015
Integrated VEL & JED, Please
View integrate.md

Integrate the VEL and the JED

Introduction

I strongly believe the JED and the VEL functions should be more tightly integrated. The VEL's usability and visibility would escalate incredibly with such a change, and adding the VEL as a "feature" OF the JED would allow both teams to have a greater positive impact on the joomla community as a whole.

Reasonings

Record De-Duplication

Currently "vulnerability" information for extensions is not maintained where that extension is most prominently accessed. Instead vulnerability information is stored on the VEL, in a static like format with no connection to the JED listing.

View trace.txt
/Users/chadwindnagle/Sites/gh-mautic/vendor/symfony/form/Symfony/Component/Form/FormView.php (line #108):
/Users/chadwindnagle/Sites/gh-mautic/vendor/symfony/form/Symfony/Component/Form/FormView.php (line #108): at Symfony\Component\Debug\ErrorHandler -> handle ( '8', 'Undefined index: address', '/Users/chadwindnagle/Sites/gh-mautic/vendor/symfony/form/Symfony/Component/Form/FormView.php', '108', array('name' => 'address') )
/Users/chadwindnagle/Sites/gh-mautic/app/bundles/EmailBundle/Views/FormTheme/Config/monitored_mailboxes_widget.html.php (line #22): at Symfony\Component\Form\FormView -> offsetGet ( 'address' )
/Users/chadwindnagle/Sites/gh-mautic/vendor/symfony/templating/Symfony/Component/Templating/PhpEngine.php (line #159): at require ( '/Users/chadwindnagle/Sites/gh-mautic/app/bundles/EmailBundle/Views/FormTheme/Config/monitored_mailboxes_widget.html.php' )
/Users/chadwindnagle/Sites/gh-mautic/vendor/symfony/templating/Symfony/Component/Templating/PhpEngine.php (line #84): at Symfony\Component\Templa
View fizzbuzz.php
<?php
/*
* Author: Chad Windnagle
* @drmmr763
*/
class FizzBuzz {
public $count;
public function __construct()
View user.sql
INSERT INTO `users` (`id`, `role_id`, `is_published`, `date_added`, `created_by`, `created_by_user`, `date_modified`, `modified_by`, `modified_by_user`, `checked_out`, `checked_out_by`, `checked_out_by_user`, `username`, `password`, `first_name`, `last_name`, `email`, `position`, `timezone`, `locale`, `last_login`, `last_active`, `online_status`, `preferences`)
VALUES
(2, 1, 1, '2015-04-01 15:15:07', 1, 'Nobody', NULL, NULL, NULL, NULL, NULL, NULL, 'madmin', '$2y$13$VkE7UjFetqAM13oT4v/VYOfRCGrJ4hbr0zuwRZo6KVfDnNb16WFwy', 'Administrator', 'Uuser', 'user@local.host', NULL, NULL, NULL, NULL, NULL, 'offline', 'N;');
@drmmr763
drmmr763 / default
Last active Jun 15, 2018
mautic-symfony-nginx
View default
server {
listen 80;
root /usr/share/nginx/html;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name _;
location / {
View shipworks3.php
<?php
/*
|
| This file and the source codes contained herein are the property
| of Interapptive, Inc. Use of this file is restricted to the specific
| terms and conditions in the License Agreement associated with this
| file. Distribution of this file or portions of this file for uses
| not covered by the License Agreement is not allowed without a written
| agreement signed by an officer of Interapptive, Inc.
@drmmr763
drmmr763 / code-around.php
Created Sep 16, 2014
JRegistry Code-Around
View code-around.php
<?php
public function getItem()
{
$eventRegistry = new JRegistry();
$eventRegistry->loadString($this->getEventBriteIds());
$validEvent = true;
$eventRegistryIterator = 0;
View registry.php
object(Joomla\Registry\Registry)#152 (1) { ["data":protected]=> object(stdClass)#445 (1) { ["0"]=> string(8) "22624261" } }