- Text Content Generator - http://www.lipsum.com
- Favicon Generator - http://tools.dynamicdrive.com/favicon
- Data Generator - https://mockaroo.com/
- Mobile Mockup Generator - https://mockuphone.com
- Logo Generator - https://www.logaster.com
- UUID Generator - https://www.uuidgenerator.net/
- Hash Generator - https://passwordsgenerator.net/sha256-hash-generator/
- Ultimate Code Generator - https://webcode.tools/
This file contains 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 puppeteer = require('puppeteer') | |
var request = require('request') | |
const fs = require('fs') | |
// 下載圖片 | |
var download = function(uri, filename, callback) { | |
request.head(uri, function(err, res, body) { | |
request(uri) | |
.pipe(fs.createWriteStream(__dirname + `/${filename}`)) | |
.on('close', function() { |
This file contains 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 fetch = require("node-fetch"); | |
retrieveStatus = async url => { | |
try { | |
const res = await fetch(url); | |
const { status } = res; | |
console.log(url, status); | |
} catch (err) { | |
// handle error for example | |
console.error(err); |
This file contains 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 fetch = require("node-fetch"); | |
retrieveStatus = async url => { | |
try { | |
const res = await fetch(url); | |
const { status } = res; | |
console.log(url, status); | |
} catch (err) { | |
// handle error for example | |
console.error(err); |
This file contains 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 puppeteer = require("puppeteer"); | |
(async () => { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
await page.goto("http://kpp.tbkc.gov.tw/tw/"); | |
await page.click('input[name="car_no"]'); | |
await page.keyboard.type("ABC-DE"); | |
await page.select("#car_tp", "C"); | |
await page.keyboard.press("Enter"); |
This file contains 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 path = require("path"); | |
// In newer Node.js versions where process is already global this isn't necessary. | |
var process = require("process"); | |
var dirName = "/Users/dannyhuang/Downloads"; | |
fs.mkdirSync(`${dirName}/images`, { recursive: true }); | |
fs.mkdirSync(`${dirName}/documents`, { recursive: true }); | |
fs.mkdirSync(`${dirName}/pdf`, { recursive: true }); |
This file contains 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 path = require("path"); | |
// In newer Node.js versions where process is already global this isn't necessary. | |
var process = require("process"); | |
var dirName = "/Users/dannyhuang/Downloads"; | |
fs.mkdirSync(`${dirName}/images`, { recursive: true }); | |
fs.mkdirSync(`${dirName}/documents`, { recursive: true }); | |
fs.mkdirSync(`${dirName}/pdf`, { recursive: true }); |
This file contains 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
{ | |
"name": "yuchung", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"purge": "postcss ./style.css -o ./style.css", | |
"build:css": "node-sass sass/main.scss ./style.css", | |
"build:js": "webpack", | |
"watch:css": "onchange 'sass/**/*.scss' 'sass/*.scss' -- npm run build:css", |
This file contains 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
// Nesting | |
// Give Variable a new name | |
const phone = { | |
type: 'iphone xsmax', | |
ssd: '128GB' | |
} | |
const {type} = phone | |
const {type: model} = phone |
This file contains 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 class="main"></div> | |
.main { | |
widht: 300px; | |
height: 700px; | |
background: linear-gradient(to bottom, rgba(23,191,171,1) 11%,rgba(159,216,239,0) 50%,rgba(156,216,238,0) 51%,rgba(23,191,171,1) 100%), url("https://fakeimg.pl/500x500") no-repeat center/cover; | |
} | |
// CSS highlight underscore |
NewerOlder