Skip to content

Instantly share code, notes, and snippets.

View billchenchina's full-sized avatar
🐱
@piggynl -touching

billchenchina billchenchina

🐱
@piggynl -touching
View GitHub Profile
@billchenchina
billchenchina / ipsec.conf
Created October 30, 2022 14:32
Strongswan IPsec with IKEv2 PSK
conn myikev2psk
auto = add
authby = psk
#compress = yes
keyexchange = ikev2
type = tunnel
dpdaction = clear
dpddelay = 30s
#rekey = no
# a good convention is to use left for the local side,
@billchenchina
billchenchina / debian.sh
Last active May 16, 2022 06:45
My setup for Debian machines
sudo apt -y install \
unattended-upgrades \
systemd-timesyncd
sudo apt -y install \
apt-file \
bash bash-completion \
binwalk \
bzip2 \
@billchenchina
billchenchina / sudoku.m
Last active July 23, 2020 08:35
EI34031-Sudoku
#{
INPUT = [0 0 0 8 1 0 0 0 0
2 0 0 3 7 0 0 0 0
8 1 0 0 0 0 0 4 0
0 0 1 0 0 0 0 7 2
0 0 0 0 0 0 0 6 3
0 7 3 0 6 0 0 0 0
0 0 9 2 0 0 6 0 0
4 0 0 0 0 6 0 0 9
0 0 0 0 0 1 7 0 0];
@billchenchina
billchenchina / 跳舞问题.tex
Last active February 28, 2020 11:31
跳舞问题
\documentclass[UTF-8]{ctexart}
\usepackage{amsmath}
\title{跳舞问题}
\author{billchenchina}
\date{\today}
\begin{document}
\maketitle
\section*{问题描述}
毕业舞会上,小伙子与姑娘跳舞。已知每个小伙子至少与一个姑娘跳过舞,但未能与所有姑娘跳过舞。同样地,每个姑娘也至少与一个小伙子跳舞,但也未能与所有的小伙子跳过舞。
@billchenchina
billchenchina / keybase.md
Created December 1, 2019 09:13
keybase.md

Keybase proof

I hereby claim:

  • I am billchenchina on github.
  • I am billchenchina (https://keybase.io/billchenchina) on keybase.
  • I have a public key whose fingerprint is 3D8F 6BCD E6BC 2E96 292D 4CFE 3019 1A2D 94AF 43DF

To claim this, I am signing this object:

@billchenchina
billchenchina / Blog.md
Last active November 5, 2019 14:23
MyBlog 20191105

20191105

肝立项报告肝到两点半,三点睡的觉。。。早上本打算 8:00-9:45 去上线代,结果成功没起来。。。

下午回了趟家,肥宅了一下午

7:00 回学校自习,签完到解决掉了 mirrors 的 rsyncd(hitlug/issues#7),但还需要再学学 rsyncd.conf 该怎么配置

哦对了,tuna 的 https://github.com/tuna/mirror-web/blob/master/geninfo/genisolist.py 有一个 listvers,貌似是为了限制 isoLink.json 列表长度。。。

@billchenchina
billchenchina / Base64.h
Created October 25, 2019 10:01 — forked from tomykaira/Base64.h
C++ single header base64 decode/encoder.
#ifndef _MACARON_BASE64_H_
#define _MACARON_BASE64_H_
/**
* The MIT License (MIT)
* Copyright (c) 2016 tomykaira
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including

常用语言标签表示法的国际标准是RFC 4646

zh-Hans 简体中文 zh-Hans-CN 大陆地区使用的简体中文 zh-Hans-HK 香港地区使用的简体中文 zh-Hans-MO 澳门使用的简体中文 zh-Hans-SG 新加坡使用的简体中文 zh-Hans-TW 台湾使用的简体中文 zh-Hant 繁体中文 zh-Hant-CN 大陆地区使用的繁体中文

@billchenchina
billchenchina / Blog.md
Last active November 5, 2019 14:14
MyBlog81315d51-7308-440c-8e91-646abdfa4f6c

20180602

This is a test blog, trying to build a AJAX Blog.

You can get me HERE!

This is a picture

Keybase proof

I hereby claim:

  • I am billchenchina on github.
  • I am billchenchina (https://keybase.io/billchenchina) on keybase.
  • I have a public key whose fingerprint is A53C 3162 CCAA 337A 59EA 6EFE F93B BBF3 ADA1 E351

To claim this, I am signing this object: