Skip to content

Instantly share code, notes, and snippets.

View cofyc's full-sized avatar

Yecheng Fu cofyc

View GitHub Profile
@cofyc
cofyc / check.go
Created October 28, 2019 02:19
kubernetes volume plugins
package main
import (
"fmt"
"k8s.io/kubernetes/cmd/kubelet/app"
"k8s.io/kubernetes/pkg/volume"
)
func main() {
@cofyc
cofyc / demo.json
Last active May 10, 2019 19:13
Demo TiDB cluster files for tidb-operator in OLM
{
"apiVersion": "pingcap.com/v1alpha1",
"kind": "TidbCluster",
"metadata": {
"name": "demo",
"namespace": "operators"
},
"spec": {
"pd": {
"image": "pingcap/pd:v2.1.0",
@cofyc
cofyc / evalsymlinks.go
Last active April 11, 2018 03:58
EvalSymlinksAtRoot
@cofyc
cofyc / debug.log
Created May 18, 2017 16:27
vagrant debug
INFO global: Vagrant version: 1.9.5
INFO global: Ruby version: 2.2.5
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_OLD_ENV_USER="cofyc"
INFO global: VAGRANT_OLD_ENV_TERM_PROGRAM="Apple_Terminal"
INFO global: VAGRANT_OLD_ENV_TERM_PROGRAM_VERSION="361.1"
INFO global: VAGRANT_OLD_ENV_XPC_SERVICE_NAME="0"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/gems/vagrant-1.9.5/bin/vagrant"
INFO global: VAGRANT_OLD_ENV_DISPLAY="/private/tmp/com.apple.launchd.KuClk7L7wV/org.macosforge.xquartz:0"
package main
import (
"flag"
"fmt"
"sync"
"time"
)
var (
@cofyc
cofyc / xrunc
Created January 24, 2015 16:12
A handy tool to compile and execute C source directly.
#!/usr/bin/env python
#
# A handy tool to compile and execute C source directly.
#
# @author Yecheng Fu <cofyc.jackson@gmail.com>
import os
import sys
import tempfile
import subprocess
/**
* dnspod-sr architecture
* Date: Fri Jan 23 22:44:47 2015 +0800
* Author: Yecheng Fu <cofyc.jackson@gmail.com>
*/
digraph G {
// graph
labelloc="t"
splines=true
label="dnspod-sr architecture"
# Uncrustify 0.59
# Default Config: http://uncrustify.sourceforge.net/default.cfg
#
# General options
#
# The type of line endings
newlines = auto # auto/lf/crlf/cr
@cofyc
cofyc / reenable_password_pasting.user.js
Created January 4, 2015 16:48
Re-enable password pasting
// ==UserScript==
// @name Re-enable password pasting
// @namespace http://yechengfu.com
// @version 0.1
// @description Re-enable password pasting.
// @author Yecheng Fu
// @match https://accounts.ctrip.com/*
// @grant none
// @refer http://prioritized.net/blog/re-enabling-password-pasting-on-annoying-web-forms/
// ==/UserScript==
@cofyc
cofyc / rfc.fix.user.js
Last active August 29, 2015 14:12
rfc fix userscript
// ==UserScript==
// @name rfc fix
// @namespace http://yechengfu.com
// @version 0.1
// @description Fix h1 headers on http://tools.ietf.org/html/rfc* pages.
// @author Yecheng Fu
// @match http://tools.ietf.org/html/rfc*
// @require http://a.tbcdn.cn/libs/jquery/1.7.1/jquery.js
// @grant none
// ==/UserScript==