json-format

如何将 json 格式化打印出来 想练手的可以手写一个出来,比如 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

hexo-next-title

hexo-next 是一个很完美的组合,这次我碰到的问题就是 title 不能显示<hello-world/> 这样的文本 比如你的网站配置文件_config.y

laravel-auth

原文出处 auth提供了很方便的登录体系,已经做到了开箱即用的便捷,但是任何方便的工具都是需要花费学习成本的,了解的过程就由些痛苦了:) 本着松

laravel-error-log

laravel有一套方便的错误采集和报错机制,如果是开发api的时候我们不需要报错页面显示的那么详细,只想返回一些错误信息,而不用把所有的响

pip

pip语言环境配置出错 root@ubuntu:~# locale 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 locale: Cannot set LC_ALL to default locale: No such file or directory LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC=zh_CN.UTF-8 LC_TIME=zh_CN.UTF-8 LC_COLLATE="en_US.UTF-8" LC_MONETARY=zh_CN.UTF-8 LC_MESSAGES="en_US.UTF-8" LC_PAPER=zh_CN.UTF-8 LC_NAME=zh_CN.UTF-8 LC_ADDRESS=zh_CN.UTF-8 LC_TELEPHONE=zh_CN.UTF-8 LC_MEASUREMENT=zh_CN.UTF-8 LC_IDENTIFICATION=zh_CN.UTF-8 LC_ALL= root@ubuntu:~# export LC_ALL=C 1 2 3 4 5 6 7 8 9 10 11

brew权限问题

在一个新的环境下安装 homebrew 新装系统时难免会遇到权限的问题,在老版系统下(osx 10.10.* )需要一些权限设置,方式如下: 1 2 3 4 5 sudo chown -R $(whoami):admin /usr/local sudo chown -R $(whoami) /Library/Caches/Homebrew brew doctor

hexo-next 的一些配置

目前对 hexo-next 添加的功能 搜索 1 $ npm install hexo-generator-searchdb --save 站点配置文件 1 2 3 4 5 search: path: search.xml field: post format: html limit: 10000 next主题配置文件 1 2 3 # Local search local_search: enable: true 生成 sitemap 1 2 $ npm install hexo-generator-sitemap --save $ npm install hexo-generator-baidu-sitemap

震惊!彩票的随机机制竟然是这样的.....

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ### <?php $lanList = []; $hongList = []; for($i=1;$i<34;$i++){ if($i<16){ array_push($lanList,$i); } array_push($hongList, $i); } $res = [ 'red' => [], 'blue' => [] ]; for($i=0;$i<=6;$i++){ if($i==0){ $res['blue'] = array_slice($lanList, mt_rand( 0,count($lanList)-1) ,1); } $res['red'][] = array_splice($hongList, mt_rand( 0,count($hongList)-1),1)[0]; } sort($res['red']);

symfony-路由

laravel的路由模块就是从这里封装起来的,咱们先了解下symfony的路由机制 使用注释定义一个路由 symfony 的强大之处在于代码中的注释都参与到程

使用hexo构建博客

本地搭建 hexo 构建hexo需要在本地安装node.js 1 brew install node 当前版本的node版本 1 2 node -v v7.7.3 全局安装 hexo 1 npm install -g hexo 国外镜像慢的话可以搜索找下淘宝