This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# The field macro which accepts the configuration object and uses it #} | |
{% macro field(config) %} | |
<div class="field-row field-row--{{ config.type | d('text') }}{{ ' field-row--' + config.size if config.size }}"> | |
{# the caller is then invoked and the config is passed back #} | |
{% if caller %}{{ caller(config) }}{% else %}<p>Default HTML here</p>{% endif %} | |
</div> | |
{% endmacro %} | |
{# calling the 'field' macro and passing in a configuration object (could be a JSON schema) #} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# global anchor ui element #} | |
{% macro abstractButton(options) %} | |
{% if not(ctx.ua.isMobile) and options.link.metaData.visibility != "mobile" or ctx.ua.isMobile and options.link.metaData.visibility != "desktop" %} | |
{%- set elm = options.elm | d('a') %} | |
<{{ elm }} | |
{{ (options.link.mobileAlt if ctx.ua.isMobile) | d(options.link.url) | d('#') | attr('href') if elm == 'a' }} | |
{{ options.baseClass | d("link") | componentClasses(options.metaData) | attr('class') }} | |
{{ options.link.properties.id | attr('id') }} | |
{{ options.metaData.data | pairs | attrs('data-') | join(' ') if options.metaData.data }} | |
{{ options.link.title | attr('title') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ############################################################################ | |
// core low level utility/helper functions | |
// ############################################################################ | |
/// @function map-value | |
/// Returns a value from a nested map. | |
/// | |
/// @access public | |
/// @param {Map | Number | String} $map-value - A map or value which is checked recursively. | |
/// @param {List} $map-value - The list of keys in sequential order. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for <var> in <list> | |
do | |
command $<var>; | |
done | |
# to unrar all rar files | |
for f in *.rar;do unrar e "$f";rm "$f";done | |
for f in *.001;do 7z e "$f";done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span\s(?:class="section-progress")>(.*)<\/span\> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% macro item(args) %} | |
<li>blah</li> | |
{% endmacro %} | |
{% macro nav(args) %} | |
<ul> | |
{{ item('foo')}} | |
{{ item('bar')}} | |
</ul> | |
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.use(function (req, res, next) { | |
_.merge(res.locals,{ | |
serviceName: config.cookieText, | |
cookieText: config.serviceName, | |
path: req.params[0], | |
postData: (req.body ? req.body : false) | |
}); | |
next(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
© |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'atom-text-editor[data-grammar="text html nunjucks"]:not([mini])': | |
'tab': 'emmet:expand-abbreviation-with-tab' | |
'atom-text-editor[data-grammar="source nunjucks"]:not([mini])': | |
'tab': 'emmet:expand-abbreviation-with-tab' | |
#https://github.com/atom/autocomplete-plus/issues/86#issuecomment-82661027 | |
'atom-text-editor.autocomplete-active:not([mini])': | |
'tab': 'autocomplete-plus:confirm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'atom-text-editor[data-grammar="text html nunjucks"]:not([mini])': | |
'tab': 'emmet:expand-abbreviation-with-tab' |