This file contains hidden or 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
'use strict'; | |
const mongoUrl = 'mongodb://my-db-address:27017';// MongoDB connection URL. | |
const filePath = 'id.list';// This must be Unix/Linux ID list file. | |
const limit = 100;// Buffer this number of documents. Then do insert. | |
const dbName = 'myDB';// DB name. | |
const collectionName = 'myCollection';// Collection name. | |
const MongoDB = require('mongodb'); | |
const MongoClient = MongoDB.MongoClient, assert = require('assert'); |
This file contains hidden or 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
from pymongo import MongoClient | |
from bson.objectid import ObjectId | |
from datetime import datetime | |
db_path = "path/to/db:27017" | |
conn = MongoClient(db_path) | |
conquer_track = conn["conquerTrack"] | |
## 所有表每日全量更新 | |
## DB name: conquerTrack |
This file contains hidden or 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
/* | |
Object.create(); | |
creates a new object with the specified prototype object and properties | |
object.create(proto[, propertiesObject]); | |
*/ | |
var obj = Object.create({}); // creates an empty object and is equivalent to obj = {} or obj = Object.create(Object.prototype) | |
var obj1 = { | |
foo : 1, |
This file contains hidden or 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
--log_gc (Log heap samples on garbage collection for the hp2ps tool.) | |
type: bool default: false | |
--expose_gc (expose gc extension) | |
type: bool default: false | |
--max_new_space_size (max size of the new generation (in kBytes)) | |
type: int default: 0 | |
--max_old_space_size (max size of the old generation (in Mbytes)) | |
type: int default: 0 | |
--max_executable_size (max size of executable memory (in Mbytes)) | |
type: int default: 0 |
This file contains hidden or 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
ps -A|awk '/searchd/ {print $1}'|xargs kill | |
#or use: killall process name |