Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing on work

見える biezhi

🎯
Focusing on work
View GitHub Profile
View Urlbox.java
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.net.URLEncoder;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Map;
import java.util.HashMap;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
View git-io-custom-url.md

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
@biezhi
biezhi / ai.clj
Last active Dec 18, 2018
AI核心代码,估值一个亿 Clojure 版本,4行代码实现
View ai.clj
(loop [value (read-line)]
(if (not= value "exit")
(do (prn (clojure.string/replace value #"吗|?|\?" {"" "", "" "", "?" "!"}))
(recur (read-line)))))
;; (ai)
;; Hello?
;; 能听懂汉语吗?
;; 真的是人工智能?
@biezhi
biezhi / github_multiple-accounts.md
Created Nov 8, 2018 — forked from JoaquimLey/github_multiple-accounts.md
How to Work with GitHub and Multiple Accounts
View github_multiple-accounts.md

Step 1 - Create a New SSH Key

We need to generate a unique SSH key for our second GitHub account.

ssh-keygen -t rsa -C "your-email-address"

Be careful that you don't over-write your existing key for your personal account. Instead, when prompted, save the file as id_rsa_COMPANY. In my case, I've saved the file to ~/.ssh/id_rsa_work.

Step 2 - Attach the New Key

@biezhi
biezhi / yaofan.md
Last active Mar 22, 2019
搭建要饭网站教程
View yaofan.md

小哥哥一起来要饭

演示站点 https://yaofan.2333.blog

需要环境

  1. 推荐 CentOS7 + Python2.7
  2. 一个域名
  3. 注册有赞和有赞云个人开发者
  4. 创建店铺并获取密钥信息
View bbr+ssr.md

安装 BBR

wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/bbr.sh && chmod +x bbr.sh && bash bbr.sh

使用方法

# 启动BBR
@biezhi
biezhi / aria2_oneindex.md
Last active Oct 21, 2020
Aria2 + OneIndex 自动上传打造离线网盘
View aria2_oneindex.md

Aria2 + OneIndex 自动上传打造离线网盘

5ba334a75cd12

1. 安装 Nginx + PHP

yum -y install wget screen curl python git
wget http://mirrors.linuxeye.com/lnmp-full.tar.gz
tar xzf lnmp-full.tar.gz
@biezhi
biezhi / jekyll-guide.md
Created Sep 19, 2018
Jekyll 中的配置和模板语法
View jekyll-guide.md

Jekyll 中的配置和模板语法

配置

文件介绍

_config.yml

Jekyll 的全局配置文件。
比如网站的名字,网站的域名,网站的链接格式等等。

@biezhi
biezhi / install_chevereto.md
Last active Mar 23, 2020
自建图床 chevereto
View install_chevereto.md

在 VPS 上搭建自己的图床,这次我们使用 chevereto 这个程序。你需要在服务器上有 Nginx、PHP、MySQL,我们使用一键安装包进行安装。

安装 LNMP

yum -y install wget screen curl python git
wget http://mirrors.linuxeye.com/lnmp-full.tar.gz
tar xzf lnmp-full.tar.gz
cd lnmp
screen -S lnmp
View maven仲裁.md

这问题蛮有意思,题目本身会涉及到jvm相关的两个话题。整篇内容是分析贴,没有博文视角。

  1. classloader的种类和加载顺序
  2. 当出现相同class jvm是如何处理的

这里我们先不说结论(网上很多)结论留在文章末尾,我在本地 maven 工程下进行尝试的时候发现一个有趣的现象,

像这样的写法大家猜猜会如何加载呢?如果你尝试的话就会发现一个问题

You can’t perform that action at this time.