Skip to content

Instantly share code, notes, and snippets.

View yellowkingdom's full-sized avatar

yellow kingdom yellowkingdom

View GitHub Profile
@yellowkingdom
yellowkingdom / PHP_thinkphp_session_db
Created May 2, 2015 06:54
PHP:Thinkphp db session,thinkphp框架的session放入数据库
<?php
/*在Application/Home/Conf/config.php里面加入如下代码*/
'SESSION_AUTO_START' => true,
'SESSION_TABLE'=>'think_session',
'SESSION_OPTIONS'=>array(
'type'=>'Db',
'expire'=>1440
)
/*然后在/Thinkphp/Library/Think/目录下面要有Session文件夹(也就是驱动)*/
@yellowkingdom
yellowkingdom / apache-index
Created April 29, 2015 01:26
apache设置默认首页 html php index
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
@yellowkingdom
yellowkingdom / apache
Created April 29, 2015 01:23
apache conf index/list ...apache服务器显示文件列表
<Directory "./htdocs/">
Options Indexes FollowSymLinks
</Directory>
@yellowkingdom
yellowkingdom / raspbian_source
Last active August 29, 2015 14:19
modify the raspbian apt source to alibaba sources 修改raspbian源为阿里源
$ sudo vim.tiny /etc/apt/source.list
#修改为
deb http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main contrib non-free rpi
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main contrib non-free rpi
然后
$ sudo apt-get update
$ sudo apt-get upgrade
@yellowkingdom
yellowkingdom / hexo_google
Created April 17, 2015 12:19
replace the google link(css/js) to baidu CDN(js) or utsc(font css) fonts link in hexo blog 在hexo静态博客中将谷歌的资源链接(css/js)替换成百度CDN或UTSC的
1.在博客根目录下:\blog\themes\landscape\layout\_partial\head.ejs 第31行 的谷歌链接改为 http://fonts.lug.ustc.edu.cn/css?family=Source+Code+Pro
2.在博客根目录下:\blog\themes\landscape\layout\_partial\after-footer.ejs 第17行 的链接改为 <script src="http://apps.bdimg.com/libs/jquery/2.0.3/jquery.min.js"></script>
然后就 hexo generate 部署即可
@yellowkingdom
yellowkingdom / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console