Skip to content

Instantly share code, notes, and snippets.

View drmmr763's full-sized avatar

Chad Windnagle drmmr763

View GitHub Profile
@drmmr763
drmmr763 / hubspot.php
Created September 9, 2015 21:07
hubspot.api
<?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();
@drmmr763
drmmr763 / login.php
Last active September 9, 2015 02:52
<?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 September 3, 2015 01:14
Integrated VEL & JED, Please

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.

@drmmr763
drmmr763 / trace.txt
Created August 18, 2015 21:25
trace
/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
<?php
/*
* Author: Chad Windnagle
* @drmmr763
*/
class FizzBuzz {
public $count;
public function __construct()
@drmmr763
drmmr763 / user.sql
Created April 1, 2015 15:16
mautic user
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 June 15, 2018 11:35
mautic-symfony-nginx
server {
listen 80;
root /usr/share/nginx/html;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name _;
location / {
@drmmr763
drmmr763 / shipworks3.php
Created December 16, 2014 16:47
v 3.9.3.1
<?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 September 16, 2014 14:06
JRegistry Code-Around
<?php
public function getItem()
{
$eventRegistry = new JRegistry();
$eventRegistry->loadString($this->getEventBriteIds());
$validEvent = true;
$eventRegistryIterator = 0;
@drmmr763
drmmr763 / registry.php
Created September 14, 2014 23:52
registry
object(Joomla\Registry\Registry)#152 (1) { ["data":protected]=> object(stdClass)#445 (1) { ["0"]=> string(8) "22624261" } }