This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ls /opt/sonatype/sonatype-work/nexus3/db/ | |
OSystem accesslog analytics audit component config model.properties security | |
$ docker-compose exec nexus java -jar ./lib/support/nexus-orient-console.jar | |
CONNECT PLOCAL:/opt/sonatype/sonatype-work/nexus3/db/component admin admin | |
REBUILD INDEX * | |
REPAIR DATABASE --fix-graph | |
REPAIR DATABASE --fix-links | |
REPAIR DATABASE --fix-ridbags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 创建文件夹 | |
wasCreated = new File('mydir').mkdir() | |
wasCreated = new File('mydir/subdir').mkdirs() | |
// 写文件 | |
f = new File('myfile.txt') | |
f.write('hello world!') | |
// 写文件2 | |
f = new File(‘myfile.txt’) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
networks: | |
kong-net: | |
driver: bridge | |
services: | |
####################################### | |
# Postgres: The database used by Kong |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package extract.excel | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook | |
import org.apache.poi.hssf.usermodel.HSSFSheet | |
import org.apache.poi.hssf.usermodel.HSSFRow | |
import org.apache.poi.hssf.usermodel.HSSFCell | |
import org.apache.poi.hssf.usermodel.HSSFDateUtil | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package mobi.dzs.util; | |
/** | |
* 16进制值与String/Byte之间的转换 | |
* @author JerryLi | |
* @email lijian@dzs.mobi | |
* @data 2011-10-16 | |
* */ | |
public class CHexConver | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def permissionSelect = { attrs -> | |
def allPerms = ((attrs.value ?: []) + grailsApplication.controllerClasses.findAll { | |
it.propertyName != "authController" | |
}.collect { controller -> | |
def base = controller.propertyName - 'Controller'; | |
controller.getURIs().collect { | |
def action = it.split('\\/') | |
action = (action.size() == 2 ? "*" : action[2]) | |
"${base}:${action}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# coding=utf-8 | |
__author__ = 'jszhou' | |
from bottle import * | |
import hashlib | |
import xml.etree.ElementTree as ET | |
import urllib2 | |
# import requests | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################## | |
# To run: | |
# curl -sSL https://gist.githubusercontent.com/sirkkalap/e87cd580a47b180a7d32/raw/d9c9ebae4f5cf64eed4676e8aedac265b5a51bfa/Install-Docker-on-Linux-Mint.sh | bash -x | |
########################################## | |
# Check that HTTPS transport is available to APT | |
if [ ! -e /usr/lib/apt/methods/https ]; then | |
sudo apt-get update | |
sudo apt-get install -y apt-transport-https | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(["dojo/_base/lang", "dijit/Tree"], function(lang, Tree){ | |
lang.extend(Tree, { | |
refresh : function() { | |
// Destruct the references to any selected nodes so that | |
// the refreshed tree will not attempt to unselect destructed nodes | |
// when a new selection is made. | |
// These references are contained in Tree.selectedItem, | |
// Tree.selectedItems, Tree.selectedNode, and Tree.selectedNodes. | |
this.dndController.selectNone(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 计算长度,中文当作两个长度 | |
String.prototype.len = function () {return this.replace(/[^\x00-\xff]/g, "**").length}; | |
"哈哈asd哈哈".len(); | |
NewerOlder