- Create a service file like
dash_sniffer.service
- Put it in
/lib/systemd/system/
- Reload
systemd
using command:systemctl daemon-reload
- Enable auto start using command:
systemctl enable dash_sniffer.service
This file contains 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
# Setting the prefix from C-b to C-a | |
set -g prefix C-a | |
# Free the original Ctrl-b prefix keybinding | |
unbind C-b | |
#setting the delay between prefix and command | |
set -sg escape-time 1 | |
# Ensure that we can send Ctrl-A to other apps |
This file contains 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
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |
This file contains 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
# -*- coding: utf-8 -*- | |
import collections | |
import yaml | |
from rest_framework import fields | |
""" | |
Convert rest_framework.fields classes to Swagger data types according to http://swagger.io/specification/ | |
Return 'string' by default. |
This file contains 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
git clone https://github.com/huangblue/codeparkshare 将fork的项目克隆到本地 | |
git remote add codeparkshare https://github.com/Yixiaohan/codeparkshare 添加远程仓库(fork的原仓库) | |
git commit 提交本地变更 | |
git remote update 更新原仓库 | |
git checkout master 检出本地分支 |
This file contains 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
------------------------------commit------------------------------ | |
$ git status # 检查文件当前的状态 | |
$ git add [文件名] # 追踪新的文件 | |
$ git diff --cached # 若要看已经暂存起来的文件和上次提交时的快照之间的差异 | |
$ git commit -m "Story 182: Fix benchmark" # 用一行命令提交更新 | |
$ git commit -a -m 'added new benchmarks' # 跳过add命令直接提交 | |
$ git rm --cached log.log # 从git仓库中删除不小心追踪的文件(用于gitignore之前追踪的文件) | |
$ git mv file_from file_to # 移动文件/重命名文件 | |
------------------------------branch------------------------------ |
This file contains 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
# LVDB - LLOOGG Memory DB | |
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com> | |
# All Rights Reserved | |
# TODO | |
# - cron with cleanup of timedout clients, automatic dump | |
# - the dump should use array startsearch to write it line by line | |
# and may just use gets to read element by element and load the whole state. | |
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |
based on https://www.reddit.com/r/vim/comments/24g8r8/italics_in_terminal_vim_and_tmux/
- Check if italic font is supported:
$ echo -e "\e[3mitalic\e[23m"
- Also check:
$ infocmp $TERM | grep sitm
sgr0=\E(B\E[m, sitm=\E[3m, smacs=\E(0, smam=\E[?7h,
This file contains 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
import asyncio | |
import functools | |
import json | |
import secrets | |
import aiohttp | |
from concurrent.futures import ALL_COMPLETED | |