This file contains hidden or 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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |
This file contains hidden or 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
// Slugify a string | |
// taken from https://www.lucidar.me/en/web-dev/how-to-slugify-a-string-in-javascript/ | |
function slugify(str) | |
{ | |
str = str.replace(/^\s+|\s+$/g, ''); | |
// Make the string lowercase | |
str = str.toLowerCase(); |
This file contains hidden or 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
// Slugify a string | |
// taken from https://www.lucidar.me/en/web-dev/how-to-slugify-a-string-in-php/ | |
function slugify($text) | |
{ | |
// Strip html tags | |
$text=strip_tags($text); | |
// Replace non letter or digits by - | |
$text = preg_replace('~[^\pL\d]+~u', '-', $text); | |
// Transliterate | |
setlocale(LC_ALL, 'en_US.utf8'); |
This file contains hidden or 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 { Template } from 'meteor/templating'; | |
import { ReactiveVar } from 'meteor/reactive-var'; | |
import './main.html'; | |
Template.hello.onCreated(function helloOnCreated() { | |
// counter starts at 0 | |
this.counter = new ReactiveVar(0); | |
}); |
This file contains hidden or 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 React from 'react'; | |
import { Meteor } from 'meteor/meteor'; | |
import { render } from 'react-dom'; | |
class Counter extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = {count: props.initialCount}; | |
this.tick = this.tick.bind(this); | |
} |
NewerOlder