http://tonyspiro.com/uploading-and-resizing-an-image-using-node-js/
http://tonyspiro.com/uploading-resizing-images-fly-node-js-express/
| #!/bin/bash | |
| user=root | |
| file=environment.js | |
| if [[ $server == develop ]]; then | |
| host=150.158.6.63 | |
| path=/data/ncbd/env | |
| port=22 | |
| elif [[ $server == develop-test ]]; then |
| import extractd from "extractd"; | |
| import { readdir } from "node:fs/promises"; | |
| import { join } from "node:path"; | |
| (async () => { | |
| const dir = "/Users/qx/Downloads/100MSDCF/"; | |
| let files = await readdir(dir); | |
| files = files | |
| .filter((file) => file.endsWith(".ARW")) | |
| .map((file) => join(dir, file)); |
| var $ = document.querySelectorAll.bind(document) | |
| var $$ = document.querySelector.bind(document) | |
| Element.prototype.on = Element.prototype.addEventListener; | |
| NodeList.prototype.on = function (event, fn) { | |
| []['forEach'].call(this, function (el) { | |
| el.on(event, fn); | |
| }); | |
| return this; | |
| }; |
| git init # 初始化本地git仓库(创建新仓库) | |
| git config --global user.name "xxx" # 配置用户名 | |
| git config --global user.email "[email protected]" # 配置邮件 | |
| git config --global color.ui true # git status等命令自动着色 | |
| git config --global color.status auto | |
| git config --global color.diff auto | |
| git config --global color.branch auto | |
| git config --global color.interactive auto | |
| git config --global --unset http.proxy # remove proxy configuration on git | |
| git clone git+ssh://[email protected]/VT.git # clone远程仓库 |
| var citiesLatLng = { | |
| "municipalities": [ | |
| { | |
| "name": "北京", | |
| "g": { | |
| "lng": "116.395645", | |
| "lat": "39.929986" | |
| } | |
| }, | |
| { |
| <html> | |
| <head> | |
| <title></title> | |
| <link rel="stylesheet" type="text/css" href="leilei.css"> | |
| </head> | |
| <body> | |
| <div class="wrapper"> | |
| <header> | |
| <div class="branding"> |
| <a href="http://jsfiddle.net/pxhRh/">Testing The DOM manipulation</a> | |
| <a href="http://jsfiddle.net/ZPKr4/">Refactoring, Stage 2</a> | |
| <a href="http://jsfiddle.net/XMDBp/">Back To The Start</a> |
| var sUserAgent = navigator.userAgent; | |
| var fAppVersion = parseFloat(navigator.appVersion); | |
| function compareVersions(sVersion1, sVersion2) { | |
| var aVersion1 = sVersion1.split("."); | |
| var aVersion2 = sVersion2.split("."); | |
| if (aVersion1.length > aVersion2.length) { | |
| for (var i=0; i < aVersion1.length - aVersion2.length; i++) { |