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
| grunt.registerMultiTask('deploy', 'deploy program to cloud', function() { | |
| var pkgcloud = require('pkgcloud') | |
| , walk = require('walk') | |
| , fs = require('fs') | |
| , done = this.async() | |
| , self = this; | |
| grunt.log.w |
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 http = require('http') | |
| , Buffer = require('buffer').Buffer | |
| , Iconv = require('iconv').Iconv; | |
| var options = { | |
| host: 'mis.tse.com.tw', | |
| path: '/data/4930.csv?r=' + new Date().getTime(), | |
| method: 'GET', | |
| }; | |
| var iconv = new Iconv('Big5', '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
| <!doctype html> | |
| <html> | |
| <head> | |
| <style> | |
| .persona { | |
| border: 1px solid #666; | |
| width: 100px; | |
| text-align: center; | |
| margin: 5px; | |
| } |
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 links = []; | |
| var casper = require('casper').create(); | |
| function getLinks() { | |
| var links = document.querySelectorAll('h3.r a'); | |
| return Array.prototype.map.call(links, function(e) { | |
| return e.getAttribute('href') | |
| }); | |
| } |
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> | |
| <link rel="stylesheet" href="style.css" media="screen" type="text/css"> | |
| </head> | |
| <body> | |
| <div class="box sunrise"><a href="#box2"></a></div> | |
| <div class="slider"> | |
| <div class="box sunset"><a href="#box1"></a></div> | |
| </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.exports = function(grunt) { | |
| // Project configuration. | |
| grunt.initConfig({ | |
| // use test module for testing, QUnit default but support different testing framework using different plugin | |
| test: { | |
| all: ['test/**/*.js'] | |
| }, | |
| // run jsLint to check your program | |
| lint: { |
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
| .box { | |
| width: 880px; | |
| height: 330px; | |
| border-radius: .5em; | |
| } | |
| .sunrise { | |
| position: absolute; | |
| background: #eee; | |
| box-shadow: 0 0 10px rgba(0, 0, 0, .7); | |
| } |
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> | |
| <link rel="stylesheet" href="style.css"> | |
| </head> | |
| <body> | |
| <a href=http://github.co |
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
| // Initializing variables | |
| var reminder = "take an umbrella"; | |
| var weatherCondition = "rainy"; | |
| // End of variables initializing | |
| console.log('Started script: Remind me to ' + reminder + ' every day the first time I unlock my phone, if it is going to be ' + weatherCondition); | |
| // register callback to device unlocked event |
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> | |
| <link rel="stylesheet" href="style.css"> | |
| </head> | |
| <body> | |
| <div id="container"> | |
| <div id="logo">LOGO</div> | |
| </div> | |
| </body> |