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 / tiny-rss-openshift-setup.md
Last active January 2, 2019 17:06
Google reader have gone, Setting Up Your Free Private Feed Reader.使用OpenShift的免费空间,配合Tiny-Tiny-Rss直接部署一个在线版的Rss Reader,经试用,支持中文挺好的。
  1. 下载tiny-tiny-rss source code
cd ~/src/git 
clone git://github.com/gothfox/Tiny-Tiny-RSS.git
  1. 创建openshift空间
@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