Skip to content

Instantly share code, notes, and snippets.

@xx7y7xx
xx7y7xx / UUID2Hex.java
Last active September 19, 2016 13:22
Convert UUID (hex string) to 128 bits
/**
* Copyright 2016 by d3vin
* https://gist.github.com/xxd3vin/ed525567e20dd5e6fc5f44e40143caaf
*
* Convert UUID (hex string) to 128 bits
* - msb: most significant 64 bits
* - lsb: least significant 64 bits
*
* Source code borrow from: https://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/id/NodeId.java
*
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xx7y7xx
xx7y7xx / node-app.json
Created September 26, 2016 07:11
PM2 project config file
{
"apps": [{
"name": "ssc30-admin-app",
"cwd": "/var/www/ssc_web",
"script": "app_admin.js",
"log_date_format": "YYYY-MM-DD HH:mm Z",
"error_file": "./log/app_admin_err.log",
"out_file": "./log/app_admin_out.log",
"env": {
"PORT": "3001"
@xx7y7xx
xx7y7xx / parse.js
Created October 22, 2016 09:04
parse从NC百分百上dump的数据
//res = {};
var item, area, project, chuchai,
areaname, projectname,
ret = {};
for ( i in res.data ) {
item = res.data[i];
areaname = item.areaname;
projectname = item.projectname;
if (!ret[areaname]) ret[areaname] = {}; // 创建深圳节点
@xx7y7xx
xx7y7xx / unflatten.js
Last active September 11, 2019 13:57
Unflatten NC ref data
/**
* Unflatten NC ref data
*
* https://gist.github.com/xxd3vin/2dc682f6996ac962bbfbfd7977ef6c1a
*
* input:
*
* ```json
* [
* {
@xx7y7xx
xx7y7xx / test.md
Last active November 18, 2016 05:53
Jekyll markdown online test
@xx7y7xx
xx7y7xx / v_pub_billform.js.diff
Created January 16, 2017 06:44
v_pub_billform.js 比较模板源码和模板编译后代码
---
+++
@@ -1,69 +1,68 @@
-define(
-'v_pub_billform',
+define(
+<#if defComponentId ??>'${_component_id}',</#if>
['jquery', 'knockout','formula',
-'/iwebap/pages/20080EBR/billform.controller.js',
+'${ctx}${getNodePath("${ctx}","${default_node_path}","${extend_node_path!''}","${hyext_node_path!''}","billform.controller.js")}/billform.controller.js',
@xx7y7xx
xx7y7xx / Img479319812.jpeg
Last active January 22, 2017 05:25
汇编语言程序员微信朋友圈使用指南
Img479319812.jpeg