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
| const cheerio = require('cheerio') | |
| const request = require('./request') | |
| const main = async () => { | |
| const html = await request('https://s.weibo.com/top/summary?cate=realtimehot') | |
| // console.log(html) | |
| const $ = cheerio.load(html) | |
| // console.log($) |
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
| #!/bin/sh | |
| DBUSER=ooo | |
| DBPASS=xxx | |
| DBNAME=db | |
| DAYS=7 | |
| DEST=/path/your/folder | |
| DATE=`date +%Y%m%d` |
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, { Component } from 'react' | |
| import favicon from '../../assets/images/favicon.ico' | |
| class HeartItem extends Component { | |
| constructor(props) { | |
| super(props) | |
| this.state = { | |
| elems: [] | |
| } |
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
| const UserTrip = require('./api/model/userTrip.js') | |
| const User = require('./api/model/user.js') | |
| const Location = require('./api/model/location.js') | |
| const jwt = require('jwt-simple') | |
| const env = require('./api/config/env.js') | |
| const { wrap: async } = require('co') | |
| const authCheck = (client, next) => { | |
| if (!client.handshake.headers['x-access-token'] && !client.handshake.query['x-access-token']) { |
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
| npm install --save google-cloud | |
| # or | |
| # npm install --save @google-cloud/storage |