Skip to content

Instantly share code, notes, and snippets.

View zhoule's full-sized avatar

Jack Zhou zhoule

  • Patsnap.com
  • Building 3 Chiswick Business Park, 566 Chiswick High Road, London, England, W4 5YA
View GitHub Profile
@zhoule
zhoule / example_prd.txt
Created April 2, 2025 01:41 — forked from hellokaton/example_prd.txt
示例 PRD 文件及提问方式
<context>
# Overview
[Provide a high-level overview of your product here. Explain what problem it solves, who it's for, and why it's valuable.]
# Core Features
[List and describe the main features of your product. For each feature, include:
- What it does
- Why it's important
- How it works at a high level]
@zhoule
zhoule / GitConfigHttpProxy.md
Created July 18, 2019 16:34 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

##In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@zhoule
zhoule / proxy_for_terminal.md
Created July 18, 2019 10:42 — forked from fearblackcat/proxy_for_terminal.md
Set proxy for terminal on mac

Shadowsocks Proxy

apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
@zhoule
zhoule / gist:06c2ffb1792b10d755891797302e4702
Created April 29, 2019 09:39 — forked from choldrim/gist:8f6d0c4e9a64910f4eda275f901b5031
10个基于Docker的顶尖开发工具

随着Docker的发展,Docker的生态圈也越来越成熟,GitHub上出现了很多与Docker相关的开源项目。近日,CenturyLink在其博客上总结了基于Docker的10个开发工具,主要集中在PaaS平台、集群管理、持续集成和Docker的管理工具等四个方面。InfoQ中文站在其基础上进行了整理,具体如下。

  1. Flynn Flynn是一个使用Go语言编写的开源PaaS平台,Flynn使用模块化的设计,任何一个模块都可以独立的进行修改、升级和替换。Flynn的目标是简化分布式环境中应用的部署和维护,通过使用git push命令,Flynn就可以将应用部署到Docker,从而省去了复杂的配置和操作。Flynn的架构大致分为两层,Layer 0是底层的资源层,提供分布式配置、任务调度、服务发现、主机隔离等基础功能;Layer 1基于Layer 0构建了一个用于集群中管理、部署、扩展服务的系统,主要包括管理API/客户端、Git接收器、数据存储、路由。Flynn目前仍在开发中,尚未发布稳定版,但已经获得了很多公司的资助,它被称为是下一代的开源PaaS平台。

  2. Deis Deis也是一个支持共有云和私有云的开源PaaS系统,Deis基于Docker和CentOS构建了一个类Heroku的PaaS系统。Deis主要设计用来和不同的云提供商进行交互,目前支持 Rackspace、EC2、 DigitalOcean、Google Compute Engine、Bare-Metal。Deis使用out-of-the-box的方式支持Ruby、Python、Node.js、Java、Clojure、Scala、Play、PHP、Perl、Dart和Go语言,同样支持git push部署。Flynn和Deis都是两个基于Docker的云计算微PaaS技术,关于它们的区别,可以参考[这篇文章](http://www.centurylinklabs.com/flynn-vs-deis-the-tale-of-two-docker-micro-pa

@zhoule
zhoule / zsh.md
Created July 15, 2017 14:20 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
@zhoule
zhoule / README.md
Created March 13, 2017 05:26 — forked from brennanMKE/README.md
React Native on macOS Sierra

React Native Trouble

Updating to macOS Sierra is causing trouble with React Native due to some of the Node.js and system utilities it uses. Specifically the watch utility fails due to a limit on the number of files which can be opened at a time.

The following command shows the current limit.

launchctl limit maxfiles
@zhoule
zhoule / README.md
Created February 17, 2017 09:19 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@zhoule
zhoule / README.md
Created September 6, 2013 15:40 — forked from agnoster/README.md

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

function get_avatar_from_service(service, userid, size) {
// this return the url that redirects to the according user image/avatar/profile picture
// implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback
// for google use get_avatar_from_service('google', profile-name or user-id , size-in-px )
// for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word )
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px )
// for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word )
// for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px )
// everything else will go to the fallback
// google and gravatar scale the avatar to any site, others will guided to the next best version