Skip to content

Instantly share code, notes, and snippets.

View firefirer1983's full-sized avatar

fyman.zhang firefirer1983

  • China Guangdong Shenzhen
View GitHub Profile
@firefirer1983
firefirer1983 / python安装须知.md
Last active August 14, 2020 10:22
python安装须知

python安装须知

install pyenv

git clone https://github.com/pyenv/pyenv.git ~/.pyenv

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc

echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bashrc
source ~/.bashrc
@firefirer1983
firefirer1983 / lepton设置.md
Last active April 8, 2020 06:42
lepton设置

lepton设置

代理设置

由于某些原因Github gist在国内访问非常慢或者无法打开,可以在~/.leptonrc配置代理访问,内容如下:

{
	"proxy": {
        "enable": true,
        "address": "socks://127.0.0.1:17720"
	}
@firefirer1983
firefirer1983 / eth私链搭建with docker.md
Last active April 8, 2020 09:03
eth私链搭建with docker

eth私链搭建with docker

获取geth image

docker pull ethereum/client-go:v1.8.12

运行geth

docker run -it --rm -v /home/xy/misc/workspace:/workspace --entrypoint /bin/sh ethereum/client-go:v1.8.12

Http组成部分

请求报文格式:

	<method> <request-URL> <version>
    <headers>
    
    <entity-body>
@firefirer1983
firefirer1983 / Ubuntu安装指南.md
Last active January 11, 2021 05:42
Ubuntu安装指南

Ubuntu安装指导

启动黑屏只有光标

如果有双硬盘(SSD + Disk),需要注意硬盘的插线顺序

因为ubuntu默认会将boot分区安装在sda上,两个硬盘的数据线的插入决定了那个为sda,那个为sdb(sdc/sdd) 一般都是将系统安装在 SSD,所以需要注意将SSD插线设置为 sda 如果系统安装在SSD,而boot安装在Disk,会导致系统黑屏,只有一个光标,说明是找不到boot分区

先安装基础的包

@firefirer1983
firefirer1983 / Docker命令.md
Last active January 14, 2021 12:58
Docker命令

Docker Commands

删除image

dr image rm -f eth-coin-in:test

在当前目录下启动python docker

dr run --rm -it -v `pwd`:`pwd` python bash

设置emacs镜像

(setq package-archives '(("gnu"   . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")
                         ("melpa" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")))

(setq package-archives '(("gnu"   . "http://elpa.emacs-china.org/gnu/")
                         ("melpa" . "http://elpa.emacs-china.org/melpa/")))
@firefirer1983
firefirer1983 / Beancount读记.md
Last active April 13, 2020 09:09
Beancount读记

单词解析

  • account(账号)

一种可以容纳其他东西的容器,如袋子

  • balance(盈余)

account所收纳对象的数量

  • debit(借)

removed(withdraw) from your account

@firefirer1983
firefirer1983 / emacs.md
Last active April 13, 2020 06:29
emacs

Emacs

命令前缀分类

ctrl-c : 本编辑模式下的快捷键 ctrl-x : 与模式无关,与文本,buff相关的快捷键 ctrl-h : 查看帮助 alt-x : 执行命令

buffer相关的操作

ctrl-x ctrl-b: 查看所有buffer ctrl-x ctrl-s: 将当前缓冲区bao