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
doctype html | |
html | |
head | |
title Hello World | |
body | |
h1 Hello World! | |
We are using io.js <script>document.write(process.version)</script> and Electron <script>document.write(process.versions['electron'])</script>. |
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
var moment = require('moment'); | |
var start = moment('2014-11-20'); | |
var now = moment(); | |
var day = now.diff(start, 'day') + 1 | |
console.log('今天是當替代役的第 ' + day + ' 天'); |
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
app.controller('Ctrl', ['$scope', '$http', ($scope, $http) -> | |
$scope.toggle = true | |
$scope.toggleClicked = -> | |
$scope.toggle = !$scope.toggle |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
$color-red-500: #f44336 | |
$color-red-50: #ffebee | |
$color-red-100: #ffcdd2 | |
$color-red-200: #ef9a9a | |
$color-red-300: #e57373 | |
$color-red-400: #ef5350 | |
$color-red-500: #f44336 | |
$color-red-600: #e53935 | |
$color-red-700: #d32f2f | |
$color-red-800: #c62828 |
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
React = require 'react' | |
module.exports = React.createClass({ | |
displayName: 'HelloReact', | |
render: -> | |
return <div>Hi~ I'm Yes</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
async = require 'async' | |
moment = require 'moment' | |
request = require 'request' | |
cheerio = require 'cheerio' | |
# task | |
startTime = moment() | |
async.parallel({ | |
forecastHour: (callback) -> | |
request 'http://www.cwb.gov.tw/V7/forecast/entertainment/3Hr/D106.htm', (err, res, body) -> |
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
React = require 'react' | |
ReactDOM = require 'react-dom' | |
$ = require 'jquery' | |
styles = | |
basic: | |
backgroundColor: 'black' | |
width: '100%' | |
height: '100%' |
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
var fs = require('fs'); | |
var parse = require('csv-parse'); | |
fs.readFile('100mountain.csv', (err, dataCSV) => { | |
if (err) throw err; | |
parse(dataCSV, (err, dataArray) => { | |
dataArray = dataArray.slice(1).map( (mountain, index) => { | |
return({ | |
index: Number.parseInt(mountain[0]), | |
name: mountain[2], |