Skip to content

Instantly share code, notes, and snippets.

View fanqi's full-sized avatar
🎯
Focusing

范琪 fanqi

🎯
Focusing
View GitHub Profile
@fanqi
fanqi / docker-registry-mirrors.md
Created January 9, 2024 09:12 — forked from y0ngb1n/docker-registry-mirrors.md
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@fanqi
fanqi / freemarker_variables_wcm
Created July 28, 2020 14:08 — forked from bmvakili/freemarker_variables_wcm
liferay 6.2 GA2 web content template freemarker variables available
scopeGroupId
expandoRowLocalService
reserved-article-id
unicodeLanguageUtil
serviceLocator
reserved-article-author-email-address
userGroupPermission
userPermission
staticFieldGetter
Images
@fanqi
fanqi / Mac OSX Setup - Brew
Created April 24, 2020 05:36 — forked from jbelke/Mac OSX Setup - Brew
Mac OSX Setup - Brew and Cask
# Get Sudo.
if [ $EUID != 0 ]; then
sudo "$0" "$@"
exit $?
fi
# Install Xcode first - https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12
# Install Xcode command line tools.
xcode-select --install
@fanqi
fanqi / AlloyUI.html
Last active April 24, 2017 02:57
call rest api to show movie info
<p>昆明正在上映的电影: <select id="movie"><option value="">请选择。。。</option> </select></p>
<hr />
<p id="intro">&nbsp;</p>
<script>
YUI().use('aui-io-request','node',function(Y){
Y.io.request(
'https://api.douban.com/v2/movie/in_theaters?city=%E6%98%86%E6%98%8E',
{
dataType: 'json',
@fanqi
fanqi / LogicalOperator.java
Created December 31, 2016 11:35
java逻辑运算符
package xyz.fanqi.java;
public class LogicalOperator {
public static void main(String[] args) {
//长路与运算
System.out.println("长路与运算:" + (b1() & b2()));
//短路与运算
System.out.println("短路与运算:" + (b1() && b2()));
//长路或运算
System.out.println("长路或运算:" + (b3() | b4()));
@fanqi
fanqi / portal-ext.properties
Last active December 20, 2016 02:21
Liferay CE 6.2.5 Xuggler
//resolve the problem of "java.net.SocketTimeoutException: connect timed out"
xuggler.jar.url=https://files.liferay.com/mirrors/xuggle.googlecode.com/svn/trunk/repo/share/java/xuggle/xuggle-xuggler/5.4/
//resolve the problem of "JVM Crash"
xuggler.jar.file[64-win]=xuggle-xuggler-arch-x86_64-w64-mingw32_LIFERAY-PATCHED-1.jar
@fanqi
fanqi / JsoupLoginTest.java
Created October 19, 2016 03:25
Jsoup模拟表单登录的例子
package xyz.fanqi.jsoup;
import org.jsoup.Connection;
import org.jsoup.Connection.Response;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
public class JsoupLoginTest {
public static void main(String[] args) throws Exception {
@fanqi
fanqi / portlet.xml
Last active July 25, 2017 09:01
line 9-12:hide 'Your request completed successfully.' in liferay-ce-ga6
<portlet>
<portlet-name>demo</portlet-name>
<display-name>demo</display-name>
<portlet-class>xyz.fanqi.demo.portlet.DemoPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/portlet/demo/view.jsp</value>
</init-param>
<init-param>
<name>add-process-action-success-action</name>