This file contains hidden or 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::{ | |
cell::RefCell, | |
collections::{hash_map::Entry, HashMap}, | |
rc::Rc, | |
}; | |
type BlockId = u64; | |
type InodeId = u64; |
This file contains hidden or 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
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common byobu \ | |
fish numactl libssl-dev pkg-config clang llvm-dev vim ipython3 curl git git-lfs \ | |
htop shellcheck valgrind cpufrequtils cloc python3-pip cmake sysstat pre-commit | |
byobu-enable |
This file contains hidden or 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
#include <sys/mman.h> | |
#include <cstdint> | |
#include <iostream> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <cassert> | |
static const uint64_t pool_size = 1024ull * 1024 * 1024; | |
static const char *pool_path = "/mnt/pmem0/test_mmap"; |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am xiangpenghao on github. | |
* I am haoxiangpeng (https://keybase.io/haoxiangpeng) on keybase. | |
* I have a public key whose fingerprint is 7B4D 504F 4EBE 0A92 38FF CCDC 669C 630E 6D6D 049B | |
To claim this, I am signing this object: |
This file contains hidden or 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
#include <glog/logging.h> | |
#include <x86intrin.h> | |
#include <chrono> | |
#include <iostream> | |
using namespace std::chrono; | |
#define TIME_BODY(name, body) \ | |
do { \ | |
auto start = high_resolution_clock::now(); \ |
This file contains hidden or 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
sudo apt update | |
sudo apt upgrade -y | |
# setup shell | |
sudo apt install -y byobu fish vim ipython3 curl git | |
byobu-enable | |
curl -L https://get.oh-my.fish > install | |
fish install --path=~/.local/share/omf --config=~/.config/omf | |
omf install bobthefish | |
echo 'set -g theme_date_format "+%a %H:%M"' >> ~/.config/fish/conf.d/omf.fish |
This file contains hidden or 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
server { | |
listen 80; | |
server_name jupyter.haoxp.xyz; | |
#charset koi8-r; | |
#access_log /var/log/nginx/host.access.log main; | |
location / { | |
proxy_pass http://127.0.0.1:8888; | |
proxy_set_header Host $host; |
This file contains hidden or 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
server{ | |
listen 80; | |
server_name file.zjuqsc.com; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 12081; | |
listen 443 ssl http2; | |
server_name file.zjuqsc.com; | |
ssl_certificate /srv/ssl/file.zjuqsc.com.crt; |