Skip to content

Instantly share code, notes, and snippets.

@baizhebz
baizhebz / webpack.dll.config.js
Created February 17, 2017 09:04
Webpack DllPlugin 预编译配置
/**
* DllPlugin 预编译
*
* 编译命令: NODE_ENV=dev webpack --config webpack.dll.config.js --progress
* @type {webpack}
*/
const webpack = require('webpack');
const path = require('path');
const isDebug = process.env.NODE_ENV === 'dev';
@baizhebz
baizhebz / textarea-paste-upload.html
Created November 30, 2016 09:28
paste a image into textarea, preview image then upload it.
<!DOCTYPE html>
<html>
<head>
<title>Laravel</title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
<style>
html, body {
height: 100%;
@baizhebz
baizhebz / drag-upload.html
Created November 30, 2016 09:20
Drag a image to the drop zone, then upload automatic.
<!DOCTYPE html>
<html>
<head>
<title>Laravel</title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
<style>
html, body {
height: 100%;
@baizhebz
baizhebz / HTML2JSX.php
Last active May 9, 2016 09:10
A simple&basic tools for html convert to jsx in React.
<?php
if ($argc === 1) {
print("please input file name.\n");
exit(-1);
}
$file_name = $argv[1];
if (!file_exists($file_name)) {
print("file does not exists.\n");