Skip to content

Instantly share code, notes, and snippets.

@steventzeng-base
steventzeng-base / ZipUtils.java
Created March 25, 2016 07:32
Java 7 NIO2 Unzip Code
public class ZipUtils {
private static final Logger LOGGER = Logger.getLogger(ZipUtils.class.getName());
public static void unzip(final Path zipFile, final Path decryptTo) {
try (ZipInputStream zipInputStream = new ZipInputStream(Files.newInputStream(zipFile))) {
ZipEntry entry;
while ((entry = zipInputStream.getNextEntry()) != null) {
LOGGER.log(Level.INFO, "entry name = {0}", entry.getName());
final Path toPath = decryptTo.resolve(entry.getName());
@steventzeng-base
steventzeng-base / fontconfig.Ubuntu.properties
Last active May 18, 2016 07:07
java font config 預設 monospace 字型爲 source code pro
#
#
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
<link href="../core-scaffold/core-scaffold.html" rel="import">
<link href="../core-header-panel/core-header-panel.html" rel="import">
<link href="../core-menu/core-menu.html" rel="import">
<link href="../core-item/core-item.html" rel="import">
<link href="../core-icon-button/core-icon-button.html" rel="import">
<link href="../core-toolbar/core-toolbar.html" rel="import">
<link href="../core-menu/core-submenu.html" rel="import">
<link href="../google-map/google-map.html" rel="import">
<polymer-element name="my-element">
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
@steventzeng-base
steventzeng-base / deploy
Last active August 29, 2015 14:06
上傳商用版權 jar 到內部 mvane 儲存庫 (以 dav:http 方式上傳)
mvn deploy:deploy-file \
-DgroupId=thegroup \
-DartifactId=theartifact \
-Dversion=1.0 \
-Dpackaging=jar \
-Durl=dav:http://internalurl \
-Dfile=3rd-party.jar
$ java -jar wljarbuilder.jar
$ jvisualvm -cp:a wlfullclient.jar -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote