Skip to content

Instantly share code, notes, and snippets.

View volkovasystems's full-sized avatar
🏠
Working from home

Richeve S. Bebedor volkovasystems

🏠
Working from home
  • volkovasystem
  • Philippines
View GitHub Profile
@volkovasystems
volkovasystems / core-data-structure
Last active March 16, 2020 08:06
core-data-structure
{
"namespace": "[@type:string<@format:schema-namespace:property-namespace>]",
"reference": "[@type:string]",
"hash": "[@type:string]",
"datetimestamp": "[@type:number<@format:YYYYMMDDHHmmss>]",
"schemaNamespace": "[@type:string]",
"propertyNamespace": "[@type:string]",
"propertyVariable": "[@type:string]",
"propertyType": [
@volkovasystems
volkovasystems / big-factorial.js
Last active November 28, 2019 20:29
Big Factorial Code
function bigFactorial( bigNumber ){
return (
eval(
Object
.keys(
Array(
Math.floor( Math.sqrt( bigNumber ) )
)
.join( )
.split( "," )
@volkovasystems
volkovasystems / factorial.js
Created November 24, 2019 22:24
Small Factorial Code
function factorial( number ){
return (
eval(
Object
.keys(
Array(
(
(
isNaN( parseInt( number ) ) === false
)
@volkovasystems
volkovasystems / mongodb-backup-protocol.txt
Created November 20, 2019 09:07
MongoDB Backup Protocol
1.) Get all the list of ObjectID references in batch process per collection.
2.) The list of ObjectID references will be the snapshot of the backup.
3.) Store the list of ObjectID references per collection to a JSON file (.json)
a.) One JSON file per collection with format, "<collection-name>-<datetimestamp>.json"
Example: user-20191122103055.json
b.) JSON file will contain an Object with "referenceList" as property containing array of ObjectID reference string.
c.) If the list is greater than 5000 elements,
c.1.) Create another JSON file with the format, "<collection-name>-<datetimestamp>-<start-index>-<end-index>.json"
4.) Backup process will focus on this snapshot list. Create another instance of mongod server under any port locally.
@volkovasystems
volkovasystems / response-interface-format.js
Last active November 12, 2019 11:45
Response Interface Format
{
"responseState": "<'success'|'failed'|'error'|'aborted'|'restricted'|'undefined'>",
"responseCode": "<Number>",
"procedureStatus": "<true|false|undefined>",
"requestStatus": "<true|false|undefined>",
"responseData": "<Object|Array|String|Number|Boolean|undefined>",
"responseMessage": ["<String>"],
@volkovasystems
volkovasystems / recompute-page-data.js
Last active January 23, 2020 18:32
recompute-page-data
"use strict";
const truly = require( "truly" );
const resolvePageData = require( "./resolve-page-data.js" );
const recomputePageData = function recomputePageData( pageData ){
pageData = resolvePageData( pageData );
const listCount = pageData.listCount;
@volkovasystems
volkovasystems / resolve-page-data.js
Last active January 23, 2020 18:14
resolve-page-data
"use strict";
const falze = require( "falze" );
const falzy = require( "falzy" );
const resolvePageData = function resolvePageData( pageData ){
/*;
@note:
pageData if string denotes pageIndex
@end-note
@volkovasystems
volkovasystems / descriptive-pagination-schema.json
Created November 4, 2019 18:17
descriptive-pagination-schema
{
"totalLength": "number",
"pageIndex": "number",
"pageCount": "number",
"pageSize": "number",
"lastPageSize": "number"
}
{
"index": "number",
"count": "number",
"size": "number",
"length": "number",
"last": "number"
}
@volkovasystems
volkovasystems / build.json
Created March 6, 2018 08:31
structure for build.json
{
"prepare": [
"npm install modchk@latest --global",
[ "modchk verify flxc --global", "npm install flxc@latest --global" ],
[ "modchk verify rsetmod --global", "npm install rsetmod@latest --global" ],
[ "modchk verify njava --global", "npm install njava@latest --global" ],
[ "modchk verify jesy --global", "npm install jesy@latest --global" ],
[ "modchk verify selenium-standalone --global", "npm install selenium-standalone@latest --global" ],
[ "modchk verify volkovasystem --global", "npm install volkovasystem@latest --global" ],
"selenium-standalone install"