Skip to content

Instantly share code, notes, and snippets.

View Ran-Xing's full-sized avatar
💭
I may be slow to respond.

星冉 Ran-Xing

💭
I may be slow to respond.
View GitHub Profile
@Ran-Xing
Ran-Xing / choose_arch.sh
Last active May 9, 2022 17:55
Choose Arch
#!/bin/sh
ARCH="$(arch)"
case "$ARCH" in
'x86_64')
export ARCH='amd64';echo $ARCH;;
'aarch64') \
export ARCH='arm64';echo $ARCH;;
'i386') \
export ARCH='i386';echo $ARCH;;
esac;
@Ran-Xing
Ran-Xing / Timestamp_Releases_Action.yml
Created October 30, 2021 05:59
Timestamp Releases Action
- name: Get version
id: time_now
run: echo "::set-output name=dir::$(date +%Y_%m_%d)"
-
name: release
uses: softprops/action-gh-release@v1
with:
files: "App/**"
body: "README"
tag_name: ${{ steps.time_now.outputs.dir }}
@Ran-Xing
Ran-Xing / delete-older-releases
Created October 30, 2021 06:00
delete-older-releases
- uses: dev-drprasad/delete-older-releases@v0.2.0
with:
repo: User/repo
keep_latest: 3
delete_tag_pattern: ""
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
@Ran-Xing
Ran-Xing / Delete old workflow runs.yml
Created October 30, 2021 06:00
Delete old workflow runs
name: Delete old workflow runs
on:
schedule:
- cron: '0 0 * * MON'
workflow_dispatch:
inputs:
days:
description: 'Number of days.'
required: true
default: "20"
@Ran-Xing
Ran-Xing / Build With Docker Push.yml
Created October 30, 2021 06:06
Build With Docker Push
name: Build With Docker Push
on:
watch:
types: [started]
jobs:
Build_With_Docker_Push:
name: AWVS14 Docker Build
runs-on: ubuntu-latest
steps:
@Ran-Xing
Ran-Xing / gen_crt.sh
Created November 1, 2021 10:02
Nginx two-way authentication
#!/bin/sh
Echo_c(){
echo "\033[1;33m\n$1\n\033[0m"
}
Rand_Name(){
openssl rand -base64 8 | md5sum | cut -c1-8
}
@Ran-Xing
Ran-Xing / hacker-tools.sh
Created November 1, 2021 10:15
Hacker-Tools-Kali
#!/bin/bash
export GitKey="github_tocken"
export GitUser="github_user"
export GitApi="https://api.github.com/repos"
# init
printf "%s\n" "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-ce-archive-keyring.gpg] https://download.docker.com/linux/debian buster stable" | sudo tee /etc/apt/sources.list.d/docker-ce.list
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/docker-ce-archive-keyring.gpg
sudo apt update -y && sudo apt upgrade -y
@Ran-Xing
Ran-Xing / zsh_init.sh
Last active December 14, 2023 07:03
zsh_init
#!/usr/bin/env bash
sudo apt-get -qq install util-linux zsh git wget -y
sudo yum install util-linux zsh git wget -y
brew install zsh git wget
sudo chsh -s /bin/zsh
if curl -s -m 5 -o /dev/null -w "%{http_code}" www.google.com | grep -q "200"; then
ghtype=false
ghproxy="https:/"
@Ran-Xing
Ran-Xing / Check_linux_info.sh
Created November 18, 2021 02:40
Check linux info
#!/bin/bash
# =================基本配置=================
NETWORK_CARD='eth2'
# =================基本配置=================
# 将屏幕输出的文件,同时保存在文档中
# 用到知识点:文件描述符与重定向,管道
logfile=checkSystemConfig.log
fifofile=checkSystemConfig.fifo
@Ran-Xing
Ran-Xing / openssl.cnf
Created November 19, 2021 19:03
ssl_tools
[ ca ]
default_ca = CA_default
[ CA_default ]
default_md = sha256
[ v3_ca ]
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always,issuer
basicConstraints = critical,CA:true
[ req ]
distinguished_name = req_distinguished_name