Skip to content

Instantly share code, notes, and snippets.

View neoFelhz's full-sized avatar

neo Felhz neoFelhz

View GitHub Profile
@neoFelhz
neoFelhz / gitstars.json
Created February 6, 2018 04:47
github stars manager for production
{"tags":[],"lastModified":1517892437953}
@neoFelhz
neoFelhz / ga.js
Last active August 31, 2018 17:43
Google Analytics 异步加载方案(PHP)
// ********************
// * Author: JerryQu
// * https://imququ.com
// *********************
(function(window, document, navigator, location) {
var screen = window.screen;
var encode = encodeURIComponent;
var data = [
'dt=' + encode(document.title),
@neoFelhz
neoFelhz / uptime.ejs
Created April 25, 2017 02:13
uptime for hexo-theme-material
<!-- 将文件放置在 _widget 目录下,然后在需要插入的地方调用该 ejs,并使用 id="htmer_time" 调用 -->
<script>
function secondToDate(second) {
if (!second) {
return 0;
}
var time = new Array(0, 0, 0, 0, 0);
if (second >= 365 * 24 * 3600) {
time[0] = parseInt(second / (365 * 24 * 3600));
second %= 365 * 24 * 3600;
@neoFelhz
neoFelhz / offline.svg
Last active April 10, 2017 05:02
Service Workers Cached JS
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@neoFelhz
neoFelhz / disqus.ejs
Last active May 7, 2017 10:56
Disqus 评论加载模式
<div id="disqus_thread"></div>
<style>
.disqus_click_btn {
line-height: 30px;
margin: 0;
min-width: 50px;
padding: 0 14px;
display: inline-block;
font-family: <%= theme.font.family %>;