Skip to content

Instantly share code, notes, and snippets.

Avatar

xiexianbin xiexianbin

View GitHub Profile
View cloudSettings
{"lastUpload":"2021-02-24T06:23:06.047Z","extensionVersion":"v3.4.3"}
View OmegaRules_auto_switch.sorl
[SwitchyOmega Conditions]
; Require: SwitchyOmega >= 2.3.2
; Date: 2018/8/11
; Usage: https://github.com/FelisCatus/SwitchyOmega/wiki/RuleListUsage
*.google.com
*.github.com
*.gitbooks.io
*.golang.org
*.facebook.com
View function
# vim:ft=sh
#本文定义通用函数, 与业务逻辑无关的通用函数(任意任务均可使用)
#所有函数, 返回值为1表示异常
get_lan_ip () {
#
ip addr | \
awk -F'[ /]+' '/inet/{
split($3, N, ".")
View configure_ssh_without_pass
#!/bin/bash
ssh-keygen -t rsa -b 2048 -N "" -f $HOME/.ssh/id_rsa
cat $HOME/.ssh/id_rsa.pub >$HOME/.ssh/authorized_keys
chmod 600 $HOME/.ssh/authorized_keys
for ip in $(awk '{print $1}' install.config); do
rsync -av -e 'ssh -o StrictHostKeyChecking=no' $HOME/.ssh/authorized_keys root@$ip:$HOME/.ssh/
View 解决 Git 在 windows 下中文乱码的问题.md

解决 Git 在 windows 下中文乱码的问题

原因

中文乱码的根源在于 windows 基于一些历史原因无法全面支持 utf-8 编码格式,并且也无法通过有效手段令其全面支持。

解决方案

  1. 安装
View auto_build.sh
#! /bin/bash
SITE_PATH='/export/Data/aotu.jd.com/index/cnt1992.github.io'
USER='admin'
USERGROUP='admin'
cd $SITE_PATH
git reset --hard origin/master
git clean -f
git pull
git checkout master
chown -R $USER:$USERGROUP $SITE_PATH
@xiexianbin
xiexianbin / delete-dockerhub-images.sh
Created Mar 22, 2018
Delete Docker images on DockerHub
View delete-dockerhub-images.sh
#!/bin/bash
# Based on kizbitz/dockerhub-v2-api-organization.sh at https://gist.github.com/kizbitz/175be06d0fbbb39bc9bfa6c0cb0d4721
# Example for the Docker Hub V2 API
# Returns all images and tags associated with a Docker Hub organization account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username, password, and organization
UNAME=""
UPASS=""
View keybase.md

Keybase proof

I hereby claim:

  • I am xiexianbin on github.
  • I am xiexianbin (https://keybase.io/xiexianbin) on keybase.
  • I have a public key whose fingerprint is B5A1 B728 A2FD 170F E0E6 C4E2 D6B7 1988 603A 67D2

To claim this, I am signing this object: