Skip to content

Instantly share code, notes, and snippets.

View drmmr763's full-sized avatar

Chad Windnagle drmmr763

View GitHub Profile
@drmmr763
drmmr763 / Dockerfile
Created May 29, 2018 01:12
Xdebug | PHP
FROM ubuntu:latest
RUN apt-get update
RUN apt-get -y install software-properties-common python-software-properties
RUN apt-get -y --no-install-recommends install \
ca-certificates \
inetutils-ping \
telnet \
curl \
nano \
net-tools \
@drmmr763
drmmr763 / Dockerfile
Created January 7, 2018 21:58
Php 7.2 dockerfile
ubuntu:latest
RUN apt-get update
RUN apt-get -y install software-properties-common python-software-properties
RUN apt-get -y --no-install-recommends install \
ca-certificates \
inetutils-ping \
telnet \
curl \
nano \
net-tools \
@drmmr763
drmmr763 / doctrine-perf.php
Last active December 6, 2017 16:42
findOne vs DQL
<?php
/**
* Class TempRepository
*/
class TempRepository extends EntityRepository
{
/**
* Find a temp entity using the temps ID
*
* @throws NoResultException|NonUniqueResultException
@drmmr763
drmmr763 / akeeba-jenkins.groovy
Last active October 24, 2017 15:09
run akeeba backup cli from jenkins, catch non fatal warnings
node('ampsnet') {
stage('backup-att') {
dir('/home/akeeba/cli') {
try {
def statusCode = sh returnStatus: true, script: 'php backup.php --profile=1'
} catch(Exception e) {
if (statusCode < 2) {
currentBuild.result = 'SUCCESS'
}
}
@drmmr763
drmmr763 / git-cherry-pick-and-revert.md
Created June 29, 2017 17:54
fix commits when you commit on the wrong branch
git checkout -b 'feature-a'
 - git commit -m 'working on feature a'
 - git commit -m 'working on feature a'
---
 - git commit -m 'working on feature b'
 - git commit -m 'working on feature b'
 - git commit -m 'working on feature b'
---
@drmmr763
drmmr763 / git rebase flow
Created May 11, 2016 14:41
just making sure I get rebasing
"remote"
git branch -v
master
"local"
git branch -v
* master
feature-a
feature-b
@drmmr763
drmmr763 / joom-nothing.md
Last active February 9, 2016 15:23
Where are we?

Hi Joomla friends

I don't wish to be negative but I do need to point out that leadership has done (from what I can see) very little in 2016 so far.

Now before I get to why that matters, let's first remember where we are at:

  1. Joomla World Conference Pandimonium: everyone on leadership is more or less completely occupied by JWC for endless amounts of time. Totally understand the lack of communication because of this.

  2. Holidays: November - January is a holiday season. Lots of time away spent with family and loved ones. Totally understandable.

@drmmr763
drmmr763 / RequestCriteria.php
Created November 12, 2015 16:39
custom request criteria
<?php
namespace App\Criteria;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use Prettus\Repository\Contracts\RepositoryInterface;
use Prettus\Repository\Contracts\CriteriaInterface;
/**
@drmmr763
drmmr763 / dave.php
Last active October 30, 2015 20:15
<div class="col-md-12">
<div id="listing-awards">
<?php
$medals = new StdClass;
$medals->text = '{fabrik view=list id=2 medals___Winery=' . $this->item->id . ' showfilters=0}';
$medalsParams = new JRegistry;
JPluginHelper::importPlugin('fabrik'); // <- this should be the name of the plugin. so if its fabrik's content
@drmmr763
drmmr763 / constraint.php
Created September 23, 2015 12:33
Constraint
<?php
namespace Advanced\Constraint; // before I defined a function phpstorm was saying this was an undefined constant
class Constraint
{
protected $constraints = array();
public function addConstraint($constrait)
{