Skip to content

Instantly share code, notes, and snippets.

View fengkx's full-sized avatar
😀
having fun

fengkx fengkx

😀
having fun
View GitHub Profile

Keybase proof

I hereby claim:

  • I am fengkx on github.
  • I am fengkx (https://keybase.io/fengkx) on keybase.
  • I have a public key ASB1sRmvuCjGhX4EDLkeGJ1QLLdYAI-rnrX-3KuYciMFkgo

To claim this, I am signing this object:

@fengkx
fengkx / cert_status.json
Last active July 11, 2021 02:45
Checker
[
{
"ok": true,
"site": "https://www.fengkx.top",
"infoAccess": {
"OCSP - URI": [
"http://r3.o.lencr.org"
],
"CA Issuers - URI": [
"http://r3.i.lencr.org/"
const PENDING = Symbol('pending');
const FULFILLED = Symbol('fulfilled');
const REJECTED = Symbol('rejected');
class MyPromise {
constructor(excutor) {
this.state = PENDING;
this.value = undefined;
this.err = undefined;
this.onFulfill = [];
@fengkx
fengkx / 3by3.py
Created October 23, 2019 15:04
3by3 中值或平均滤波
import numpy as np
import pickle
pic_str=b'\x80\x02cnumpy.core.multiarray\n_reconstruct\nq\x00cnumpy\nndarray\nq\x01K\x00\x85q\x02c_codecs\nencode\nq\x03X\x01\x00\x00\x00bq\x04X\x06\x00\x00\x00latin1q\x05\x86q\x06Rq\x07\x87q\x08Rq\t(K\x01K\x08K\x08\x86q\ncnumpy\ndtype\nq\x0bX\x02\x00\x00\x00i8q\x0cK\x00K\x01\x87q\rRq\x0e(K\x03X\x01\x00\x00\x00<q\x0fNNNJ\xff\xff\xff\xffJ\xff\xff\xff\xffK\x00tq\x10b\x89h\x03X\x00\x02\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
#
# Mar 2013 Yad Smood
# VCS
YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} "
YS_VCS_PROMPT_PREFIX2=":%{$fg[cyan]%}"
@fengkx
fengkx / post.swig
Last active June 24, 2018 02:46
Valine Next主题 themes/next/layout/_macro
{% macro render(post, is_index, post_extra_class) %}
{% set headlessPost = Array.prototype.indexOf.call(['quote', 'picture'], post.type) > -1 %}
{% set post_class = 'post post-type-' + post.type | default('normal') %}
{% set post_class = post_class + ' ' + post_extra_class | default('') %}
{% if post.sticky > 0 %}
{% set post_class = post_class + ' ' + 'post-sticky' %}
{% endif %}
@fengkx
fengkx / comments.swig
Created June 23, 2018 13:35
Valine Next主题 themes/next/layout/_partials/
{% if page.comments %}
<div class="comments" id="comments">
{% if (theme.duoshuo and theme.duoshuo.shortname) or theme.duoshuo_shortname %}
<div class="ds-thread" data-thread-key="{{ page.path }}"
data-title="{{ page.title }}" data-url="{{ page.permalink }}">
</div>
{% elseif theme.facebook_sdk.enable and theme.facebook_comments_plugin.enable %}
<div class="fb-comments"
data-href="{{ page.permalink }}"
data-numposts="{{ theme.facebook_comments_plugin.num_of_posts }}"
@fengkx
fengkx / hypercomments.swig
Last active June 23, 2018 13:25
Valine Next主题 next/layout/_third-party/comments
{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname and not theme.disqus_shortname and not (theme.valine.enable and theme.valine.appkey and theme.appid) %}
{% if theme.hypercomments_id %}
<script type="text/javascript">
_hcwp = window._hcwp || [];
_hcwp.push({widget:"Bloggerstream", widget_id: {{ theme.hypercomments_id }}, selector:".hc-comment-count", label: "{\%COUNT%\}" });
{% if page.comments %}
{"sig":"9d447dbe78440ad07721290753a52ca7ba9ec7c06ddf4ae67a209fabd33524bcc45c0e63ff690e68b650d26fa43f054b0c5c34121621e96dd0422c7117c13d750","msghash":"6e5c953f7118dcc24523a3b1ca1302af19f8e6b300be17657e21d27ba78b1aca"}