测试服务器性能
View QRterminal.java
import com.google.zxing.BarcodeFormat; | |
import com.google.zxing.EncodeHintType; | |
import com.google.zxing.MultiFormatWriter; | |
import com.google.zxing.WriterException; | |
import com.google.zxing.common.BitMatrix; | |
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; | |
import java.util.Hashtable; |
View git_upstream.md
开源协作,为了规范,一般都是 fork 别人的仓库到自己帐号下,再提交pr,原始仓库一直保持更新,下面介绍如何保持自己fork之后的仓库与上游仓库同步。
下面以我 fork Blade 仓库为例
点击 fork 到自己帐号下,然后就可以在自己的帐号下 clone 相应的仓库
使用 git remote -v
查看当前的远程仓库地址,输出如下:
origin git@github.com:biezhi/blade.git (fetch)
View character.md
<title>常用HTML转义字符,html转义符,JavaScript转义符,html转义字符表,HTML语言特殊字符对照表(ISO Latin-1字符集) - 来源:嘻嘻网 114.xixik.com</title>
<style type="text/css" media="screen">
View yaofan.md
小哥哥一起来要饭
https://yaofan.2333.blog
演示站点需要环境
- 推荐 CentOS7 + Python2.7
- 一个域名
- 注册有赞和有赞云个人开发者
- 创建店铺并获取密钥信息
View zshrc
# I you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/biezhi/.dotfiles/zsh | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
#ZSH_THEME="robbyrussell" | |
#ZSH_THEME="ys" |
View mysql_back.sh
#!/bin/sh | |
#this is the prefix before the filename and can be anything you want | |
fileprefix='mysql_backup_'; | |
#this is your mysql user - best to create a new mysql user called backup that has access to all databases | |
myuser='backup'; | |
#your mysql password | |
mypass='s0mething$ecure123'; |
View UrlShortener.java
public class UrlShortener { | |
// private static final String ALPHABET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | |
private static final String ALPHABET = "mUSNcOa6hDgfnEJ1rGMPC03jv4k9RIqL2Yy7TQdH8xu5XFWwAKoZVstizlepBb"; | |
private static final int BASE = ALPHABET.length(); | |
public static String encode(int num) { | |
StringBuilder sb = new StringBuilder(); | |
while (num > 0) { | |
sb.append(ALPHABET.charAt(num % BASE)); |
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
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
.