Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Deshi Xiao xiaods

🏠
Working from home
View GitHub Profile
View Reply to @owocki question
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.
View docker-desktop-logging.md
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 Jun 22, 2018 — forked from joaopizani/.screenrc
A killer GNU Screen Config
View .screenrc
# 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 Apr 2, 2018 — forked from algermissen/.vimrc
My vimrc focussing on Rust development
View .vimrc
" 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 Jul 18, 2017
go lang continuous test shell function
View go-lang-continuous-test.md

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
View build mesos in centos 7 docker container.md
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 Jun 10, 2017 — forked from Stono/create-docker-tls.sh
Creating and setting up Docker for TLS
View create-docker-tls.sh
#!/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 Apr 5, 2017
MESOS-7210_test-case-steps
View mesos-7210-testcase.md

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 Feb 3, 2017 — forked from jordelver/gist:3073101
Set the Mac OS X SOCKS proxy on the command line
View gist:a86ed470969d3dc344c2ef2adaa45a32

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 Nov 20, 2015
永洪BI产品数人云安装方法
View yh-shurenyun-install-tutorial.md

下载安装包

文件名为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
You can’t perform that action at this time.