Skip to content

Instantly share code, notes, and snippets.

View narration-sd's full-sized avatar

Narration SD narration-sd

  • San Diego
  • 00:53 (UTC -08:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am narration-sd on github.
  • I am narrationsd (https://keybase.io/narrationsd) on keybase.
  • I have a public key ASBcapBcMV-rsrwJe-OsX9EyxlkI85QwLe7cq7ThxKdj2Qo

To claim this, I am signing this object:

// 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) {
window.sessionStorage.setItem(getPageKey(),
@narration-sd
narration-sd / craft-beta-usage.txt
Created September 9, 2017 22:58
Advice on CraftCMS Beta re: production use
[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
narration-sd / gist:21158af0a0aef7cd34834ca399901a0b
Created August 2, 2017 23:51
Homestead 6.0.2 dual site not separated php problem vagrant up log
C:\vagrant\gnu\staging_constantholidays_html>vagrant destroy
sch.dev: Are you sure you want to destroy the 'sch.dev' VM? [y/N] y
==> sch.dev: Forcing shutdown of VM...
==> sch.dev: Destroying VM and associated drives...
C:\vagrant\gnu\staging_constantholidays_html>vagrant up
Bringing machine 'sch.dev' up with 'virtualbox' provider...
==> sch.dev: Importing base box 'laravel/homestead'...
==> sch.dev: Matching MAC address for NAT networking...
==> sch.dev: Checking if box 'laravel/homestead' is up to date...
@narration-sd
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 Authorize.net. The idea is to avoid the large challenge of gaining actual PCI certification for your server, which would be a bank-level task.
12:06]
mcclaskiem Anyone have experience with PCI Compliance + Craft
[12:07]
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??
[12:08]
mcclaskiem I am using Commerce to handle the e-commerce aspect of the website
[12:08]
@narration-sd
narration-sd / craftbradch
Created September 30, 2013 02:31
some Chinese for CMS testing
Here's the offending Chinese title:
4 這是
It comes out as path/slug:
blog/4
Here's a Korean one that works:
3 번
Which comes out properly:
@narration-sd
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.
<body>
{% spaceless %}
{% macro affiliate (author) %}
{%- if author.affiliation -%}
{{- " - " ~ author.affiliation -}}
{%- endif -%}
{% endmacro %}
{% import _self as macros %}
@narration-sd
narration-sd / gist:6203750
Created August 11, 2013 06:46
Achieving a list of authors in CraftCMS/Twig
Output:
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