Skip to content

Instantly share code, notes, and snippets.

Avatar

ouweiya ouweiya

View GitHub Profile
@ouweiya
ouweiya / cmd
Created Jun 6, 2019
copy .vscode
View cmd
@echo off
cp -i -r %~dp0.vscode %cd%
echo %cd%
@ouweiya
ouweiya / print_picture.js
Created Sep 20, 2018
Chrome console print picture 2018
View print_picture.js
(function(c) {
c.image = function(t) {
var img = new Image;
img.src = t;
img.onload = function (){
var style = [
"padding:" + Math.floor(img.height / 2) + "px " + Math.floor(img.width / 2)+ "px",
"background: url("+ encodeURI(t) +")",
"color: transparent",
"font-size:0",