Skip to content

Instantly share code, notes, and snippets.

View zhang3xing1's full-sized avatar
🤠

zhang3xing1 zhang3xing1

🤠
  • Luniondata
  • Shanghai, China
View GitHub Profile
@zhang3xing1
zhang3xing1 / basic-sanity-validation-profile.fio
Created February 7, 2024 15:14 — forked from szaydel/basic-sanity-validation-profile.fio
[fio profiles] fio profiles for load generation, device or system stress and IO simulation/profiling #tags: fio, load, profiling, fio-load, load-gen, load generation, io, io profiling, filesystem, stress, io-load
; fio profile for basic sanity validation of configured system.
[global]
ioengine=solarisaio
; ioengine=linuxaio
; ioengine=libaio
; fsync=16
; rw=read
iodepth=16
; rw=randrw ; Random IO
@zhang3xing1
zhang3xing1 / gunicorn.py
Created February 2, 2024 08:27 — forked from HacKanCuBa/gunicorn.py
A config file of gunicorn(http://gunicorn.org/) contains fundamental configuration.
"""Gunicorn config file.
by HacKan (https://hackan.net)
Find it at: https://gist.github.com/HacKanCuBa/275bfca09d614ee9370727f5f40dab9e
Based on: https://gist.github.com/KodeKracker/6bc6a3a35dcfbc36e2b7
Changelog
=========
See revisions to access other versions of this file.
@zhang3xing1
zhang3xing1 / secret-key.py
Created January 2, 2024 06:25 — forked from shaunmolloy/secret-key.py
secret-key - Generate an app secret key
#!/usr/bin/env python
# secret-key
# Generate an app secret key
from base64 import b64encode
from os import urandom
random_bytes = urandom(64)
token = b64encode(random_bytes).decode()
@zhang3xing1
zhang3xing1 / install-docker.sh
Created August 4, 2023 21:33 — forked from rashidul-hasan/install-docker.sh
Shell script to install Docker CE on Ubuntu 22.04
#!/bin/bash
echo "Updating apt..."
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
echo "Adding the GPG key for the official Docker repository..."
@zhang3xing1
zhang3xing1 / airflow-docker-compose.yml
Created February 16, 2023 06:45 — forked from jerowe/airflow-docker-compose.yml
Airflow Docker Compose Configuration - Includes airflow scheduler, airflow worker, airflow webserver, rabbitmq, and postgresql
version: '3'
# Run as
# docker-compose build; docker-compose up -d
# Check with
# docker ps
# Then check the logs with
# docker logs --tail 50 $container_id
# docker-compose images
# docker-compose logs --tail 20 repo_name
@zhang3xing1
zhang3xing1 / docker_quick_run.sh
Created December 6, 2022 12:14 — forked from gmolveau/docker_quick_run.sh
Quickly run a temporary docker container and execute bash to try things (like a CI script)
docker run --rm -it -v $PWD:/tmp debian:10-slim /bin/bash
# --rm : remove after exit
# -it : interactive TTY
# -v : mount folder : current folder to /tmp folder of the container
# debian:10-slim : docker image https://git.io/JJzfy
# /bin/bash : run bash in this container
@zhang3xing1
zhang3xing1 / npm.taobao.sh
Created March 13, 2022 11:48 — forked from lvxianchao/npm.taobao.sh
设置 npm 和 yarn 的镜像源为淘宝镜像源
# ==========================================================
# NPM
# ==========================================================
npm set registry https://r.npm.taobao.org # 注册模块镜像
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
## 以下选择添加
npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass # node-sass 二进制包镜像
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ # electron 二进制包镜像
@zhang3xing1
zhang3xing1 / entry.sh
Created March 1, 2022 04:46 — forked from xkortex/entry.sh
dockerfile entrypoint for activating conda environment
#!/bin/bash
## Entrypoint for docker RUN directives as well as ENTRYPOINT with conda env
## Enable by adding:
## COPY entry.sh ./
## SHELL ["/entry.sh", "/bin/bash", "-c"]
##
## Optionally, set the following env to select a conda env to run in
## ENV CONDA_DEFAULT_ENV=foo
## You may also want to add something like
## RUN conda init bash && echo 'conda activate "${CONDA_TARGET_ENV:-base}"' >> ~/.bashrc
@zhang3xing1
zhang3xing1 / actionlist.vim
Created August 12, 2021 04:41 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@zhang3xing1
zhang3xing1 / github-to-bitbucket
Last active May 29, 2021 10:13 — forked from sangeeths/github-to-bitbucket
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone git@bitbucket.org:abc/myforkedrepo.git
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync git@github.com:def/originalrepo.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v