Skip to content

Instantly share code, notes, and snippets.

{:version 1,
:blocks
({:block/id #uuid "d6e20893-53f0-4180-a78a-714b361c637c",
:block/page-name "Contents",
:block/children
({:block/id #uuid "630dd9ac-4e82-4472-ae81-65483d65414a",
:block/format :markdown,
:block/children [],
:block/content ""})}
{:block/id #uuid "630dd9ac-f850-4696-b119-4712a33e65b0",

Keybase proof

I hereby claim:

  • I am eindex on github.
  • I am eindexli (https://keybase.io/eindexli) on keybase.
  • I have a public key ASDZ8Ho_Af8AErRpc2P82z8OtAWHKik5SH3c1AFqGhJFDwo

To claim this, I am signing this object:

### Added by Zinit's installer
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
print -P "%F{33} %F{34}Installation successful.%f%b" || \
print -P "%F{160} The clone has failed.%f%b"
fi
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
# zinit config
zinit snippet https://gist.githubusercontent.com/hightemp/5071909/raw/
omz_plugins=(
git
tmux
thefuck
gitignore
cp
colored-man-pages
@EINDEX
EINDEX / starship.toml
Last active November 23, 2021 12:33
Starship 配置
# Inserts a blank line between shell prompts
# add_newline = true
format = """
$username@$hostname\
$all\
"""
right_format = """
$cmd_duration\
$memory_usage\
$battery\
logseq
burp-suite
burp-suite-professional
@EINDEX
EINDEX / middlewares.py
Created March 26, 2019 09:05
scrapy fake useragent middlewares
class FakeUserAgentDownloadMiddleware(object):
from fake_useragent import UserAgent
ua = UserAgent()
@classmethod
def from_crawler(cls, crawler):
# This method is used by Scrapy to create your spiders.
s = cls()
crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)
return s
@EINDEX
EINDEX / cow_ssr_subscription.py
Created September 4, 2017 15:08
SS、SSR 通用的 SSR 订阅转 Cow 配置文件生成器
# coding: utf-8
import requests
import base64
import os
from collections import namedtuple
SsInfo = namedtuple('SsInfo', 'server port protocol encrypt garble password')
HOME = os.environ['HOME'] + '/'
HEADERS = {
def fib(num):
"""
计算斐波那契数列
:param num: 需要的斐波那契数列的位置
:return: 数
"""
a, b = 0, 1
for _ in range(num):
a, b = b, a + b
return b