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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
number1: 0, | |
number2: 0, | |
actions: { | |
updateName1(nameField) { | |
// nameField is a reference to the input-field | |
// the inptut value is in target.value |
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
<div> | |
<h1>Shopping List</h1> | |
<ul> | |
<li>Apples</li> | |
<li>Tomatos</li> | |
<li>Banana</li> | |
</ul> | |
</div> |
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
module Main exposing (..) | |
import Html exposing (..) | |
import Html.Attributes exposing (style) | |
type alias Model = | |
{ title : String, items : List Item } | |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
booking: Ember.inject.service(), | |
stops: ["Lux", "DUS", "MUC"], | |
actions: { | |
changeDepartureStop(stop) { | |
this.get('booking').set('stop', stop); | |
} |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
actions: { | |
onClick() { | |
this.get('router').transitionTo('http://heise.de'); | |
} | |
} | |
}); |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
name: Ember.computed('appName', function() { | |
return this.get('appName').toLowerCase(); | |
}) | |
}); |
- Create a new folder
mkdir gatsby-demo && cd $_
- create package.json
npm init -y
- add packages
npm i react react-dom gatsby
- create page directory
mkdir -p src/pages/
- create index page in
src/pages/index.js
:
import React from "react"
export default () => <div>Hello world!</div>
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
nnoremap <silent> <C-l> :<C-u>nohlsearch<CR><C-l> |
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
// using: | |
// deno sitemap-checker.ts 400 | |
// start at number 400 and tests the next 200 | |
import readFileStrSync from "https://deno.land/std/fs/mod.ts"; | |
async function checkUrl(url: string): Promise<boolean> { | |
const res = await fetch(url); | |
return res.status == 200; | |
} |