- Check if a page variable has been defined
-
Set variables in a page (page.html.haml) at the very biginning of the file:
--- variable: value variable2: value 2 ---
-
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
/*! | |
* JavaScript preload() function | |
* Preload images, CSS and JavaScript files without executing them | |
* Script by Stoyan Stefanov – http://www.phpied.com/preload-cssjavascript-without-execution/ | |
* Slightly rewritten by Mathias Bynens – http://mathiasbynens.be/ | |
* Demo: http://mathiasbynens.be/demo/javascript-preload | |
*/ | |
function preload(arr) { | |
var i = arr.length, |
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
// conditional hiding/showing made ... | |
if (chapterTitleHasVisibleFollowingNotes) { | |
$chapterTitle.show(); | |
} else { | |
$chapterTitle.hide(); | |
} | |
// ... simple | |
$chapterTitle.toggle(chapterTitleHasVisibleFollowingNotes); |
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
helpers do | |
def buffer() | |
@_out_buf | |
end | |
def capture(buffer) | |
pos = buffer.size | |
yield | |
buffer.slice!(pos..buffer.size) | |
end | |
def my_helper(&block) |
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
/* eslint-disable camelcase */ | |
/* global define */ | |
(function (define) { | |
'use strict'; | |
var _; | |
var moment; | |
define(function (require) { | |
require('common/common.module'); |
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
import Head from 'next/head' | |
import { Container } from 'reactstrap' | |
const Layout = (props) => ( | |
<div> | |
<Head> | |
<title>PairHub</title> | |
<meta name="viewport" content="initial-scale=1.0, width=device-width" /> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" /> | |
</Head> |
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
version: '2' | |
services: | |
blog: | |
image: jekyll/jekyll | |
command: jekyll serve --livereload | |
ports: | |
- "4000:4000" | |
- "35729:35729" | |
volumes: | |
- .:/srv/jekyll |
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
<body> | |
<div id="⚛️"></div> | |
<script src="https://unpkg.com/react@16.0.0/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom@16.0.0/umd/react-dom.development.js"></script> | |
<script src="https://unpkg.com/babel-standalone@6.26.0/babel.js"></script> | |
<script type="text/babel"> | |
ReactDOM.render(<div>Hello World!</div>, document.getElementById('⚛️')) | |
</script> | |
</body> |
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
{ | |
"1": { | |
"entity_id": "1", | |
"type_id": "simple", | |
"sku": "dress_test", | |
"status": "1", | |
"visibility": "4", | |
"tax_class_id": "2", | |
"weight": "1.0000", | |
"price": "1500.0000", |
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
upstream node-app { | |
# Enable this to use theserver running inside docker | |
# server node-app:3000; | |
# Enable this to use the (development) server running on your localhost | |
server host.docker.internal:3000; | |
} | |
server { | |
location / { |
OlderNewer