Skip to content

Instantly share code, notes, and snippets.

Leevi Graham leevigraham

Block or report user

Report or block leevigraham

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
leevigraham / AbstractRepository.php
Last active Apr 18, 2018
AbstractRepository::filterByCriteria - Parses a nested array and adds expressions to a query builder
View AbstractRepository.php
namespace App\Doctrine\ORM\Repository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\QueryBuilder;
abstract class AbstractRepository extends ServiceEntityRepository
leevigraham / example.html
Last active Oct 18, 2018
Renderless Flyout.Vue component
View example.html
<flyout v-cloak>
<div slot-scope="props">
v-bind:class="'border-2 p-1 ' + (props.isActive ? 'bg-green': 'bg-red')"
class="list-reset bg-white border p-4 shadow z-10"
View flyout.vue
<div ref="trigger">
<slot name="trigger"
<button v-on:click="toggle">Toggle</button>
leevigraham / example.php
Last active Apr 8, 2018
Support for verb requests in craftcms v2
View example.php
// Example in your plugin file
public function registerSiteRoutes(): array {
return [
'api/.*+' => ['action' => 'nCIG/preFlight', 'verb' => 'OPTIONS'],
View Lets Encrypt Domains,,,,
leevigraham / Generate ssl certificates with Subject Alt Names on
Last active Nov 7, 2019
Generate ssl certificates with Subject Alt Names
View Generate ssl certificates with Subject Alt Names on

Generate ssl certificates with Subject Alt Names on OSX

We're going to generate a key per project which includes multiple fully qualified domains. This key can be checked into the project repo as it's intended for local development but never used on production servers.

Save ssl.conf to your my_project directory.

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

set -eu
echo "steps:"
echo "
- label: \":hammer: dev\"
command: |-
source .env
set -eu
echo "steps:"
echo "
- label: \":hammer: dev\"
command: |-
source .env
View gmap_field.js
* Google Maps for ExpressionEngine v3
* @package Google Maps for ExpressionEngine
* @subpackage Javascript
* @category Fieldtype
* @author Justin Kimbrell
* @copyright Copyright (c) 2012, Objective HTML
* @link
* @version 3.3.0
You can’t perform that action at this time.