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
use std::cmp::Ordering; | |
use std::str::FromStr; | |
use std::time::{Duration, SystemTime}; | |
use rand::distributions::Standard; | |
use rand::{Rng, SeedableRng}; | |
use rand_xoshiro::Xoshiro256PlusPlus; | |
#[allow(unused_imports)] | |
use rayon::prelude::*; |
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
'use strict'; | |
// {% post_permalink [slug] %} | |
hexo.extend.tag.register('post_permalink', function (args) { | |
const slug = args.shift(); | |
if (!slug) return this.permalink; | |
const post = hexo.model('Post').findOne({slug: slug}); | |
if (!post) return; |
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 stringify(arg0) { | |
const memo = new Set(); | |
function helper(arg, indent) { | |
if (typeof(arg) === 'undefined') return 'undefined'; | |
if (typeof(arg) === 'boolean') return arg.toString(); | |
if (typeof(arg) === 'number') return arg; | |
if (typeof(arg) === 'string') return '"' + arg.substr(0, 32).replace(/\n/g, '\\n') + '"'; | |
if (typeof(arg) === 'symbol') return 'SYMBOL'; | |
if (typeof(arg) === 'function') return '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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Hexo</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<meta property="og:type" content="website"> | |
<meta property="og:title" content="Hexo"> | |
<meta property="og:url" content="http://yoursite.com/index.html"> |