Skip to content

Instantly share code, notes, and snippets.

<!-- 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' : '' }}">
@homleen
homleen / create-ssl-cert.md
Created July 30, 2013 13:54
Creating a Self-Signed SSL Certificate
$ 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
@homleen
homleen / dabblet.css
Created July 30, 2013 04:38
环形进度条,css bt版
/**
* 环形进度条,css bt版
*/
html,body { height:100%; }
body {
display: flex;
justify-content: center;
align-items: center;
}
@homleen
homleen / dabblet.css
Created July 30, 2013 04:38 — forked from kejun/dabblet.css
环形进度条,css bt版
/**
* 环形进度条,css bt版
*/
html,body { height:100%; }
body {
display: flex;
justify-content: center;
align-items: center;
}
@homleen
homleen / get_days_of_current_month.php
Created July 27, 2013 09:25
获取当前月的所有日期
$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
@homleen
homleen / html-boilerplate.html
Created June 28, 2013 07:23
Simple html boilerplate.
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>Boilerplate</title>
</head>
<body>
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
@homleen
homleen / Makefile
Created June 15, 2013 15:12
compress css
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"
@homleen
homleen / javascript.array.js
Created June 15, 2013 12:07
有趣的Javascript Array
// 先来定义一个数组,并尝试输出其结果
> var a = [1, 2, 3];
> a
[1, 2, 3]
// 目前来看一切正常,没有任何问题
// ok,开始做点有意思的事
> a[-1] = 4;
// 数组发生变化了吗?
> a