Skip to content

Instantly share code, notes, and snippets.

View MrHuxu's full-sized avatar

xhu MrHuxu

View GitHub Profile
@MrHuxu
MrHuxu / Dockerfile
Created December 13, 2023 12:30
dive into deep learning
FROM continuumio/miniconda3
EXPOSE 8888
RUN conda install jupyter -y --quiet
RUN conda install pytorch torchvision cpuonly -c pytorch -y --quiet
RUN pip3 install d2l
RUN mkdir -p /opt/notebooks
ENTRYPOINT [ "jupyter" ]
@MrHuxu
MrHuxu / .wezterm.lua
Last active April 18, 2022 03:50
wezterm config
local wezterm = require 'wezterm';
return {
font = wezterm.font("Iosevka NF"),
color_scheme = "Ayu Mirage",
font_size = 19.0,
window_background_image = "/Users/xhu/Pictures/1380180928620.jpg",
window_background_image_hsb = {
brightness = 0.018,
hue = 1.0,
@MrHuxu
MrHuxu / .tmux.conf
Last active April 18, 2022 08:43
tmux configs
# Enable true color
set -g default-terminal 'tmux-256color'
set-option -ga terminal-overrides ',xterm-256color:Tc'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
@MrHuxu
MrHuxu / dependencies
Last active April 24, 2022 14:38
nvim configs
neovim
ripgrep
gopls
rust-analyzer
lua-language-server
@MrHuxu
MrHuxu / Makefile
Last active August 13, 2021 18:10
Makefile font bold & colored
FONT_RED := $(shell tput setaf 1)
FONT_GREEN := $(shell tput setaf 2)
FONT_YELLOW := $(shell tput setaf 3)
FONT_BLUE := $(shell tput setaf 4)
FONT_PURPLE := $(shell tput setaf 5)
FONT_CYAN := $(shell tput setaf 6)
FONT_GRAY := $(shell tput setaf 7)
FONT_BLACK := $(shell tput setaf 8)
FONT_BOLD := $(shell tput bold)
FONT_RESET := $(shell tput sgr0)
@MrHuxu
MrHuxu / style.css
Created May 28, 2021 09:09
no zhihu for stylish
header, .GlobalSideBar.GlobalSideBar--old, .TopstoryTabs.Topstory-tabs, .Card>img, .CommentsV2-footer, .ColumnPageHeader, .Recommendations-Main, .ContentItem-actions .Popover, .Button.ContentItem-action.Button--withIcon, .VoteButton--up>span>svg, .VoteButton--down, .AuthorInfo-avatar, .Voters>button {
display:none;
}
.Topstory-container {
display: block;
width: 100%;
padding: 0 150px;
}
.Topstory-mainColumn {
background-color: #555;
@MrHuxu
MrHuxu / gvm.fish
Last active May 27, 2021 14:39
use gvm in fisher shell
# install https://github.com/edc/bass using fisher/omf
# place this file in .config/fish/functions
function gvm
bass source ~/.gvm/scripts/gvm ';' gvm $argv
end
@MrHuxu
MrHuxu / Dockerfile
Last active November 4, 2022 03:17
gfriends
FROM debian:stable-slim
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN apt-get update && apt-get install -y unzip expect
WORKDIR /gfriends
COPY ./Gfriends-Inputer-ubuntu-latest.zip /gfriends/
RUN unzip Gfriends-Inputer-ubuntu-latest.zip \
&& mv Gfriends\ Inputer gfriends-inputer \
@MrHuxu
MrHuxu / [vps] Caddyfile docker-compose
Last active April 30, 2021 17:12
[vps] Caddyfile docker-compose
clone this project to /root/work
volumes
docker/caddy/index.html:/etc/caddy/index/index.html
docker/caddy/caddyfile:/etc/caddy/Caddyfile
port
8008:80