Skip to content

Instantly share code, notes, and snippets.

View shawndxl's full-sized avatar

shawndxl

View GitHub Profile
@shawndxl
shawndxl / vue&webpack.md
Last active July 27, 2016 12:31
Vue + Webpack

Vue + Webpack Demo

Vue

  • 最简单的
<div id='app'>
<p>{{name}}</p>
@shawndxl
shawndxl / fis.md
Last active August 23, 2016 06:20
Fis3 Useage

Fis3 Useage

本机编写代码

最简单的例子:在本地建立端口并监听

手动打开127.0.0.1:8080访问或者通过本机局域网地址+端口号:8080访问,如果无效,手动运行 fis3 server stop, 然后再次运行命令端口号即可重置为8080,也可以直接运行fis3 server info 查看目前fis3在哪个端口运行

fis3 server start && fis3 release -wL
@shawndxl
shawndxl / mock.md
Last active July 16, 2016 07:03
js pugin: MockJS

Js Plugin MockJs Useage

  • install
bower intall github:mock.git
  • link
@shawndxl
shawndxl / mysqldemo.md
Last active July 11, 2016 13:39
php mysql

php set mysql demo

  • process-oriented model
$host = 'localhost';
$user = 'root';
$pass = '';
$data_base = 'test';
@shawndxl
shawndxl / jsimg.md
Last active August 25, 2016 13:42
JS 代码片段记录

js 保存图片 / canvas 重绘图片

思路,利用FileReader 生成image的src,这个src(base64数据)可以防止到div中作为展示,或者直接保存到数据库中,也可以插入到canvas中重绘,利用canvas.toDataURL()得到新的src(base64数据)

  • 放置到div中展示
@shawndxl
shawndxl / point.md
Created June 2, 2016 03:23
不规则图形的前端表现探索
@shawndxl
shawndxl / node.md
Last active June 6, 2016 14:49
Node 常用功能

Common Node Uses / Node 常用功能

创建 Server

  • http
var http = require('http');
http.createServer(function(req, res) {
	res.writeHead(200, {"Content-Type": "text/html"}); // not necessary but better set
	res.end('<div>Hello world!</div>');
}).listen(3000);
@shawndxl
shawndxl / css.md
Last active June 6, 2016 06:15
css 常用功能总结

CSS 常用功能总结

位置

  • 左右居中
  1. margin 法
  2. text-align 法
  3. 50% 法

[[[pen slug-hash='BKXmyO' height='300' embed-version='2']]]

@shawndxl
shawndxl / chatroom.md
Last active July 16, 2016 07:08
即使没有人,说给世界听--聊天室的何去何从

How To abandent the room idea to build a new kindof chat location

so we can say , even no noe is here we can still talk to the world,即使没有人,说给世界听

Redis 使用方法

  • linux 安装redis

  • 开启 redis 服务

  • 关闭 redis 服务 (要指定好药关闭的redis服务器的ip和port.)

 /usr/local/redis/redis-cli -h 127.0.0.1 -p 6379 shutdown