Version : 1.0.0-16-04-05 Author : LiuYue
node
是element
的父类(Element.nodeType 的值为 1
)(node
的子类还有TextNode
,注释等).
document
是node
,但不是element
// Refrence from: https://gist.github.com/beevelop/a0f2c76e79610dca01550c9a93f83876 | |
// Copy following scripts in the developer console of page included markdown content you want to print: | |
(function () { | |
var $ = document.querySelector.bind(document); | |
$('#readme').setAttribute('style', 'position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;background-color:white'); | |
$('#readme>article').setAttribute('style', 'border: none'); | |
$('body').innerHTML = $('#readme').outerHTML; | |
window.print(); | |
})(); |
#!/usr/bin/env node | |
//https://gist.github.com/hangxingliu/0b9604ef8ea5e11df36d8919613609be | |
let fs = require('fs'), | |
fatal = msg => console.error(`\n error: ${msg}\n`) + process.exit(1); | |
let babelrcPath = process.argv[2] || '.babelrc'; | |
fs.existsSync(babelrcPath) || ( |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/xenial64" | |
# 不自动升级 | |
config.vm.box_check_update = false | |
# 虚拟机内的8080 => 8080 | |
config.vm.network "forwarded_port", guest: 8080, host: 8080 |
#!/usr/bin/env node | |
//@ts-check | |
/// <reference types="node" /> | |
// https://github.com/microsoft/vscode/blob/main/extensions/theme-solarized-light/themes/solarized-light-color-theme.json | |
const VERSION = "2023-07-22"; | |
const AUTHOR = "Liu Yue <[email protected]>"; | |
const IS_WINDOWS = process.platform == "win32"; | |
const IS_OSX = process.platform == "darwin"; |
Windows Registry Editor Version 5.00 | |
; Remember change cmder path to your cmder installation path (and path separation should be use \\ to instead of \) | |
; 记得修改安装路径 | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder] | |
""="Cmder" | |
"Icon"="G:\\DevTools\\cmder\\Cmder.exe" | |