Skip to content

Instantly share code, notes, and snippets.

View narration-sd's full-sized avatar

Narration SD narration-sd

  • near border, ocean, outside San Diego
  • 07:00 (UTC -07:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am narration-sd on github.
  • I am narrationsd ( on keybase.
  • I have a public key ASBcapBcMV-rsrwJe-OsX9EyxlkI85QwLe7cq7ThxKdj2Qo

To claim this, I am signing this object:

View ScrollMemNonEs6.js
// ScrollMemNonEs6.js -- A small library to do own scroll memory positioning
// It's decomposed from an ES6-React module version, for proper use with Craft and Twig
function getPageKey () {
// this is tagged in a Gatsby-like way but our own variant, for clarity and lack of collisions
return '%%live-vue-pos' + '|' + window.location.pathname;
function holdPosition (e) {
narration-sd / craft-beta-usage.txt
Created September 9, 2017 22:58
Advice on CraftCMS Beta re: production use
View craft-beta-usage.txt
[edited and preserved from a Slack reply 09 Sept 2017]
...I think we all feel the Bend (Craft Central) advice is very accurate about not using the beta for production; rather keeping Craft 2 going for public use there, while doing preparatory development internally on Craft 3 crossover and particularly, plugins.
Reasons: there are still breaking changes going on, as well as loopholes which show up every week in parts you may think are fully working at first.
This is because a) nice things occur by opportunity and the team's thoroughness, as the recent complete replacement for the better of the task system, and b) besides taking on a big jump in the underlying framework, Yii1 -> Yii2, this beta has brought a lot of other valuable advances meaning sometimes rather complete rewrites of fundamental code.
I would say the Craft team, with persons in Europe and Australia as well, is as good as it gets for all of this, just needing the chance and the feedback we give beyond thorough testing to tie down all the
narration-sd / gist:21158af0a0aef7cd34834ca399901a0b
Created August 2, 2017 23:51
Homestead 6.0.2 dual site not separated php problem vagrant up log
View gist:21158af0a0aef7cd34834ca399901a0b
C:\vagrant\gnu\staging_constantholidays_html>vagrant destroy Are you sure you want to destroy the '' VM? [y/N] y
==> Forcing shutdown of VM...
==> Destroying VM and associated drives...
C:\vagrant\gnu\staging_constantholidays_html>vagrant up
Bringing machine '' up with 'virtualbox' provider...
==> Importing base box 'laravel/homestead'...
==> Matching MAC address for NAT networking...
==> Checking if box 'laravel/homestead' is up to date...
narration-sd / gist:1a0f8308a9695f032274f36b8ea7f59c
Last active July 10, 2016 19:08
PCI commerce Security with Craft: a CraftCMS Slack thread on avoiding private customer information ever hitting your server. The discussion includes Stripe, Joel Bradbury's Charge plugin for Stripe, and The idea is to avoid the large challenge of gaining actual PCI certification for your server, which would be a bank-level task.
View gist:1a0f8308a9695f032274f36b8ea7f59c
mcclaskiem Anyone have experience with PCI Compliance + Craft
narration_sd @mcclaskiem: do you really want to do anything involving PCI on your own server, or wouldn't off-loading on for example Stripe be a much less agonizing path??
mcclaskiem I am using Commerce to handle the e-commerce aspect of the website
narration-sd / craftbradch
Created September 30, 2013 02:31
some Chinese for CMS testing
View craftbradch
Here's the offending Chinese title:
4 這是
It comes out as path/slug:
Here's a Korean one that works:
3 번
Which comes out properly:
narration-sd / gist:6208607
Created August 12, 2013 06:17
A cleaner, more knowledge-applying example of building article author attribution lists in Twig/Craft CMS.
View gist:6208607
{% spaceless %}
{% macro affiliate (author) %}
{%- if author.affiliation -%}
{{- " - " ~ author.affiliation -}}
{%- endif -%}
{% endmacro %}
{% import _self as macros %}
narration-sd / gist:6203750
Created August 11, 2013 06:46
Achieving a list of authors in CraftCMS/Twig
View gist:6203750
Blog Entries with Authors
First Article
by F. Scott Fitzgerald - Ancestral, and James Michener - Dell Pocket Books
Second Article
by John Fowles - Oxford University, 이오령 - 이회여자대학교, and 김덕종 - KAIST Materials Science
Third Article and Counting