Skip to content

Instantly share code, notes, and snippets.

@xx7y7xx
xx7y7xx / v_pub_billform.js.diff
Created Jan 16, 2017
v_pub_billform.js 比较模板源码和模板编译后代码
View v_pub_billform.js.diff
---
+++
@@ -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 / test.md
Last active Nov 18, 2016
Jekyll markdown online test
View test.md
@xx7y7xx
xx7y7xx / unflatten.js
Last active Sep 11, 2019
Unflatten NC ref data
View unflatten.js
/**
* Unflatten NC ref data
*
* https://gist.github.com/xxd3vin/2dc682f6996ac962bbfbfd7977ef6c1a
*
* input:
*
* ```json
* [
* {
@xx7y7xx
xx7y7xx / parse.js
Created Oct 22, 2016
parse从NC百分百上dump的数据
View parse.js
//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 / node-app.json
Created Sep 26, 2016
PM2 project config file
View node-app.json
{
"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"
View atlanta_search_bfs_2.json
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xx7y7xx
xx7y7xx / UUID2Hex.java
Last active Sep 19, 2016
Convert UUID (hex string) to 128 bits
View UUID2Hex.java
/**
* 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
*
@xx7y7xx
xx7y7xx / README.md
Last active Aug 9, 2016
社会保险网上服务手机客户端下载
View README.md
@xx7y7xx
xx7y7xx / portal.js
Last active Aug 9, 2016
~/opt/uap/NC633bgy0409_160708/hotwebs/portal/tpl/webclassic/allcompressed/portal.js
View portal.js
var link_Pre = "P_U_R_L_";
var tipShowFlag = false;
var currentTipMeta = "";
$(function() {
window.NCPortalSupportPortletMode = ["view", "edit", "help"];
window.NCPortalSupportPortletModeName = {
view: trans("ml_portlet_mode_view"),
edit: trans("ml_portlet_mode_edit"),
help: trans("ml_portlet_mode_help")
};
View mongodb_sample.js
// http://mongodb.github.io/node-mongodb-native/2.0/getting-started/quick-tour/
var MongoClient = require('mongodb').MongoClient
, assert = require('assert');
// Connection URL
var url = 'mongodb://localhost:27017/myproject';
var insertDocuments = function(db, callback) {
// Get the documents collection