Skip to content

Instantly share code, notes, and snippets.

View leevigraham's full-sized avatar
🍹

Leevi Graham leevigraham

🍹
View GitHub Profile
@leevigraham
leevigraham / gist:b48ed5382e497a6497ac
Created November 26, 2014 12:01
Asset renaming with [gulp|grunt]-rev and git history
Given unicorn.css
When we first run gulp-rev the filename is unicorn-098f6bcd.css
If we check this into git then unicorn-098f6bcd.css is added to the index
If we change unicorn.css and run gulp-rev the filename changes to unicorn-xxxxxxxx.css
Committing this to git means unicorn-098f6bcd.css is deleted and unicorn-xxxxxxxx.css is added.
This breaks the file history of the revved file.
You still have a full history of the original unicorn.css which still counts and is super important.
'articles/details/:url_title' => function (\rsanchez\ResourceRouter\Router $router, $wildcard) {
$ee = ee();
$ee->load->helper('date');
$query = $ee->db->select('edit_date')
->from('channel_titles')
->join('channels', 'channel_titles.channel_id = channels.channel_id')
->where('url_title', (string) $wildcard)
->where('channel_name', 'articles')
@leevigraham
leevigraham / gist:d1f5a4e7572d1249e89b
Last active April 8, 2018 01:49
Assets 2.5 patch to add :revved_url manipulation
diff -ENwbur /Users/leevigraham/Downloads/Assets2.5/ee2/third_party/assets/ft.assets.php /Volumes/Sites/Work/Internal/example.com/app/third_party/assets/ft.assets.php
--- /Users/leevigraham/Downloads/Assets2.5/ee2/third_party/assets/ft.assets.php 2014-11-11 10:30:36.000000000 +1100
+++ /Volumes/Sites/Work/Internal/example.com/app/third_party/assets/ft.assets.php 2015-03-13 14:26:27.000000000 +1100
@@ -1900,6 +1900,14 @@
}
/**
+ * Replace Revved URL
+ */
+ function replace_revved_url($data, $params)
From 8921f5b7da6be46d7c1949c424a0d1210fac3d9e Mon Sep 17 00:00:00 2001
From: Iain Saxon <[email protected]>
Date: Thu, 26 May 2016 18:45:37 +1000
Subject: [PATCH] Fixed the gmapStringifyReplacer function to work with
pre-flattened JSON
---
.../gmap/javascript/gmap_field.js | 46 ++++++++++++++++++----
1 file changed, 38 insertions(+), 8 deletions(-)
/**
* Google Maps for ExpressionEngine v3
*
* @package Google Maps for ExpressionEngine
* @subpackage Javascript
* @category Fieldtype
* @author Justin Kimbrell
* @copyright Copyright (c) 2012, Objective HTML
* @link http://www.objectivehtml.com/google-maps
* @version 3.3.0
#!/bin/bash
set -eu
echo "steps:"
echo "
- label: \":hammer: dev\"
command: |-
source .env
#!/bin/bash
set -eu
echo "steps:"
echo "
- label: \":hammer: dev\"
command: |-
source .env
@leevigraham
leevigraham / Generate ssl certificates with Subject Alt Names on OSX.md
Last active June 11, 2024 09:48
Generate ssl certificates with Subject Alt Names

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.

DOMAIN.buildbox.newism.com.au,
www.DOMAIN.buildbox.newism.com.au,
dev.DOMAIN.buildbox.newism.com.au,
stage.DOMAIN.buildbox.newism.com.au,
master.DOMAIN.buildbox.newism.com.au
0xab13d6983e7fe97b0c873f58536ad33412edc0a2