This file contains 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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v1 | |
mQENBFkgK7UBCADiDZCI37cTPEGW9hHP0AcsVItwozCjjd2bGdNoxOdINiQKHuaX | |
ILDipjwM1MgaLDculcbzH/LekviL8IKqwJbqWsNJfG6OW2WPUvn+UbCOdBzp2+Be | |
QO4vNFEaZGINeZ5cQuXU/+Z8kV0TauIqc3ngGxF4F/Kp1PNLtX8j5+LoV68pcTUt | |
ojmHXDc2gfFtH/bxAcZtpXyU2KgKGJab6ojOc/EE72qUe/+T/fiEhqQ+vUPdUgMe | |
Zl3CCi2+h9pe75lm2mlNi+jQjG/mS499bCgfFfZUAICniO0KKja++Wox4v/uDCyz | |
B/FRg5uuZJaliaWD8EF6AS5IP0NLpXJkqkDnABEBAAG0JjYyMXNhbWEgKHByaW50 | |
ZW1wdykgPGhAcHJpbnpldWdlbi5uZXQ+iQE2BBMBCgAgBQJZICu1AhsDBQsJCAcD |
This file contains 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
<?php | |
namespace App\Services; | |
use Illuminate\Support\Arr; | |
use Illuminate\Support\Str; | |
use Illuminate\Contracts\Support\Arrayable; | |
/** | |
* @property string $name |
This file contains 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
{ | |
"configurations": [ | |
{ | |
"name": "MinGW G++", | |
"intelliSenseMode": "gcc-x64", | |
"compilerPath": "C:\\Portable\\mingw64\\bin\\g++.exe", | |
"includePath": [ | |
"${workspaceFolder}/**" | |
], | |
"defines": [], |
This file contains 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
language: node_js | |
node_js: stable | |
# 只监听 source 分支的改动 | |
branches: | |
only: | |
- source | |
# 缓存依赖,节省持续集成时间 | |
cache: |
This file contains 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
<?php | |
/** | |
* @Author: printempw | |
* @Date: 2016-01-31 17:08:29 | |
* @Last Modified by: prpr | |
* @Last Modified time: 2016-02-02 16:31:55 | |
* | |
* Database type, `mysql` or `sqlite` | |
*/ | |
define('DB_TYPE', 'mysql'); |
This file contains 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
# For local shell, prompt is lik this | |
# ➜ blessing-skin-server git:(master)$ | |
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" | |
PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}%{$reset_color%}%{$fg_bold[blue]%}$ %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗ %{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
This file contains 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
$('.load-gist').on('click', function() { | |
var gist = { | |
// URL 传参自己改下 | |
url: '//gist.github.com/printempw/' + $(this).data('hash') + '.json?callback=?', | |
dom: this | |
} | |
// 因为 URL 中带了 `callback=?`,所以这里 jQuery 会使用 JSONP 方式请求 | |
$.getJSON(gist.url, function(data) { | |
// 加载样式 |
This file contains 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
/** | |
* 这里处理一下 slug,去掉多余字符。 | |
* Hexo 博客中的页面(即 layout 为 page)的 `page.path` 会带上一个 `index.html`,搞不懂为什么。 | |
*/ | |
String.prototype.cleanSlug = function () { | |
var search = '/index.html'; | |
if (this.indexOf(search) === -1) { | |
return this.slice(0, -1) | |
} else { |
This file contains 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
/** | |
* 差不多就是把一些项目中的现有代码黏在一起,能用而已。目前实现的功能有: | |
* | |
* - 生成 TOC(废话) | |
* - 滚动监听(高亮当前项目) | |
* - 点击跳转 | |
*/ | |
// https://github.com/ghiculescu/jekyll-table-of-contents | |
(function($){ |
This file contains 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
function isEmpty(obj) { | |
// null and undefined are "empty" | |
if (obj == null) return true; | |
// Assume if it has a length property with a non-zero value | |
// that that property is correct. | |
if (obj.length > 0) return false; | |
if (obj.length === 0) return true; |