$ openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
$ openssl rsa -passin pass:x -in server.pass.key -out server.key
$ rm server.pass.key
$ openssl req -new -key server.key -out server.csr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Example on how to set class="active" on active navigation links --> | |
<!-- These links will always be visible --> | |
<li class="{{ URI::is( 'home') ? 'active' : '' }}"> | |
<a href="{{ URL::to( 'home') }}"> | |
Home | |
</a> | |
</li> | |
<li class="{{ URI::is( 'gallery') ? 'active' : '' }}"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 环形进度条,css bt版 | |
*/ | |
html,body { height:100%; } | |
body { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 环形进度条,css bt版 | |
*/ | |
html,body { height:100%; } | |
body { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$start = new \DateTime('first day of this month'); | |
$end = new \DateTime('first day of this month + 1 month'); | |
$period = new \DatePeriod($start, new \DateInterval('P1D'), $end); | |
foreach($period as $day){ | |
// here check if you have records with this date and print them, | |
// otherwise print default values | |
print $day->format('d.m.Y') . "\n"; | |
} |
There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.
I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:
- Register Roles
- Register Users
- Update Users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Boilerplate</title> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WTF YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Alexey Silin <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WTF YOU WANT TO PUBLIC LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CHECK=✔ | |
HR=\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# | |
build: | |
@echo "${HR}" | |
@echo "Building Up..." | |
@echo "${HR}" | |
@cat css/{bootstrap,custom,bootstrap-responsive,font-awesome}.css > css/up.css | |
@recess --compress css/up.css > css/up.min.css | |
@echo "Compressing CSS with Recess... ${CHECK} Done" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 先来定义一个数组,并尝试输出其结果 | |
> var a = [1, 2, 3]; | |
> a | |
[1, 2, 3] | |
// 目前来看一切正常,没有任何问题 | |
// ok,开始做点有意思的事 | |
> a[-1] = 4; | |
// 数组发生变化了吗? | |
> a |