Skip to content

Instantly share code, notes, and snippets.

View xiaods's full-sized avatar
🌏
Coding for Fun

Deshi Xiao xiaods

🌏
Coding for Fun
View GitHub Profile
I am from China and I am working remotely at home to prevent the epidemic in Wuhan. Open source software and GitCoin provide me with more opportunities to earn income. This is the power of open source, allowing Chinese companies to use open source software in large quantities and benefit developers, thanks to open source.
pred='process matches ".*(ocker|vpnkit).*"
  || (process in {"taskgated-helper", "launchservicesd", "kernel"} && eventMessage contains[c] "docker")'

/usr/bin/log stream --style syslog --level=debug --color=always --predicate "$pred"
@xiaods
xiaods / .screenrc
Created June 22, 2018 05:14 — forked from joaopizani/.screenrc
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@xiaods
xiaods / .vimrc
Created April 2, 2018 00:37 — forked from algermissen/.vimrc
My vimrc focussing on Rust development
" HOW TO DO 90% OF WHAT PLUGINS DO (WITH JUST VIM)
" Max Cantor
" NYC Vim Meetup -- August 3, 2016
@xiaods
xiaods / go-lang-continuous-test.md
Created July 18, 2017 16:22
go lang continuous test shell function

Go lang continuous test shell function

This function is assumed to be run from the root of a Go lang project. It calculates the sha1 value of the project's directory tree every 10 seconds. If the value of the command has changed then go test ./... is executed causing all the tests in the project to be run.

Shell function

function goct() {
    local project_hash=-1
    while true; do
yum update
yum install -y tar wget
wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
cat <<EOF > /etc/yum.repos.d/wandisco-svn.repo
[WANdiscoSVN]
name=WANdisco SVN Repo 1.9
enabled=1
baseurl=http://opensource.wandisco.com/centos/7/svn-1.9/RPMS/$basearch/
@xiaods
xiaods / create-docker-tls.sh
Last active June 10, 2017 11:28 — forked from Stono/create-docker-tls.sh
Creating and setting up Docker for TLS
#!/bin/bash
# This script will help you setup Docker for TLS authentication.
# Run it passing in the arguement for the FQDN of your docker server
#
# For example:
# ./create-docker-tls.sh myhost.docker.com
#
# The script will also create a profile.d (if it exists) entry
# which configures your docker client to use TLS
#
@xiaods
xiaods / mesos-7210-testcase.md
Last active April 5, 2017 23:34
MESOS-7210_test-case-steps

firstly install minimesos, then use minimesos to get overrall mesos image. then stop all containers.

HOST_IP=172.28.128.3


### Mesos Master
./bin/mesos-master.sh --hostname=${HOST_IP} --ip=${HOST_IP} --zk=zk://${HOST_IP}:2181/mesos --port=5050 --quorum=1 --work_dir=/tmp/mesos --log_dir=/tmp/log/mesos
@xiaods
xiaods / gist:a86ed470969d3dc344c2ef2adaa45a32
Created February 3, 2017 20:53 — forked from jordelver/gist:3073101
Set the Mac OS X SOCKS proxy on the command line

Set the Mac OS X SOCKS proxy on the command line

a.k.a. what to do when your ISP starts blocking sites :(

Set the SOCKS proxy to local SSH tunnel

networksetup -setsocksfirewallproxy "Ethernet" localhost 8080

To clear the domain and port

@xiaods
xiaods / yh-shurenyun-install-tutorial.md
Last active November 20, 2015 00:05
永洪BI产品数人云安装方法

下载安装包

文件名为YonghongBI.sh

使用java:8镜像为基础容器镜像

dsxiao@omegamaster1:~$ docker images java
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
java 8 de4a13c84f53 8 days ago 641.9 MB