Skip to content

Instantly share code, notes, and snippets.

View lusi1990's full-sized avatar
🏠
Working from home

World Fucker lusi1990

🏠
Working from home
View GitHub Profile
@lusi1990
lusi1990 / aria2.conf
Created September 13, 2023 02:07 — forked from qzm/aria2.conf
Best aria2 Config
### Basic ###
# The directory to store the downloaded file.
dir=${HOME}/Downloads
# Downloads the URIs listed in FILE.
input-file=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to FILE on exit.
save-session=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0
save-session-interval=60
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5
@lusi1990
lusi1990 / Install-Redis-Desktop-Manager.sh
Created June 20, 2022 03:09 — forked from thiagomgo/Install-Redis-Desktop-Manager.sh
Install Redis Desktop Manager from source on Ubuntu
# Clone the repository from GitHub
git clone --recursive https://github.com/uglide/RedisDesktopManager.git -b 0.8.0 rdm && cd ./rdm
# Compile the source
cd src/
./configure
source /opt/qt56/bin/qt56-env.sh && qmake && make
sudo checkinstall -D --install
sudo gdebi /home/$USER/rdm/src/src_*.deb
cd /usr/share/redis-desktop-manager/bin
@lusi1990
lusi1990 / fibonacci.py
Created March 30, 2022 02:10
斐波那契数列
"""
生成斐波那契数列的前20个数。
说明:斐波那契数列(Fibonacci sequence),又称黄金分割数列,
是意大利数学家莱昂纳多·斐波那契(Leonardoda Fibonacci)在《计算之书》中提出一个
在理想假设条件下兔子成长率的问题而引入的数列,所以这个数列也被戏称为"兔子数列"。
斐波那契数列的特点是数列的前两个数都是1,从第三个数开始,每个数都是它前面两个数的和,
形如:1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ...。斐波那契数列在现代物
理、准晶体结构、化学等领域都有直接的应用。
"""
@lusi1990
lusi1990 / docker-compose-v.yml
Last active March 28, 2022 06:47 — forked from markheath/docker-compose-v1.yml
Elasticsearch docker compose examples
version: '3.1'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.9.2-amd64
container_name: elasticsearch
environment:
- discovery.type=single-node
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"