Skip to content

Instantly share code, notes, and snippets.

View corwien's full-sized avatar

Corwien corwien

View GitHub Profile
@corwien
corwien / Cache.class.php
Created September 20, 2017 15:39
PHP写入文件缓存
<?php
/**
* 缓存对外调用类
*
* @author Corwien
* @version 20170920
* @copyright corwien@126.com
*/
@corwien
corwien / traverse.php
Last active August 8, 2017 09:37
找出文件夹中的文件含有某些特殊文字的文件的脚本
<?php
/**
* 该加密文件的特征 $cryptz_dpath/bjkey.php
*/
// 定义 要解密的文件夹和解密到的文件夹
define ( "ENCODE_PATH", "encode" );
define ( "DECODE_PATH", "decode" );
header ( "Content-type: text/html; charset=utf-8" );
@corwien
corwien / cls_template.php
Created July 23, 2017 14:00
PHP模板引擎
<?php
/**
* 模板对象处理类
*
* @link http://baison.com.cn
* @copyright Baison, Inc.
* @package eBussiness
* @version $Id: cls_template.php,v 1.0 2010/05/22 07:35:58 modified $
@corwien
corwien / easy_adminlte.html
Last active May 22, 2017 07:34
Simple and easy adminlte2 demo 管理后台示例 https://segmentfault.com/a/1190000009496018
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>AdminLTE 2 | Dashboard</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.6 -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
@corwien
corwien / phone_zone_and_country_code.json
Created May 15, 2017 07:54
国际手机区号对应码整理
[
{
"zone_code": "86",
"zone_name": "中国大陆"
},
{
"zone_code": "852",
"zone_name": "中国香港"
},
{
@corwien
corwien / markdown-side-menu-demo.html
Created May 4, 2017 23:25
Markdown 生成文章侧边栏目录Demo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Markdown 生成文章侧边栏目录-@corwien</title>
<link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="http://yandex.st/highlightjs/6.2/styles/googlecode.min.css">
@corwien
corwien / markdown-side-menu.html
Created May 4, 2017 23:23
Markdown 生成文章侧边栏目录
<link rel="stylesheet" href="http://yandex.st/highlightjs/6.2/styles/googlecode.min.css">
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="http://yandex.st/highlightjs/6.2/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="text/javascript">
$(document).ready(function(){
$("h2,h3,h4,h5,h6").each(function(i,item){
var tag = $(item).get(0).localName;
@corwien
corwien / Markdown.scss
Created April 24, 2017 14:48
A simple and beautiful markdown style parse
.markdown {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #636b6f;
overflow: hidden;
line-height: 2;
word-wrap: break-word;
a {
background: transparent;
@corwien
corwien / bootsrap-grid-system-layout.html
Last active March 19, 2017 07:36
A simple bootstrap grid system demo(网格系统布局例子) Link: https://segmentfault.com/a/1190000008748514
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bootstrap 实例 - 布局偏移列-@corwien</title>
<link rel="stylesheet" href="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body style="margin:50px;background:gray;">
@corwien
corwien / passwordvalidation
Created March 3, 2016 02:58 — forked from Michael-Brooks/passwordValidation.php
Laravel Password validation Regex (Contain at least one uppercase/lowercase letters and one number)
/*
* Place this with the rest of your rules.
* Doesn't need to be in an array as there are no pipes.
*/
$rules = array(
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'
);
/*
* Use this one if you also require at least one symbol.