Moved to KaMeHb-UA/require
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
export const PAYMENT_STATE_CREATING = 0x00 | |
export const PAYMENT_STATE_CREATED = 0x01 | |
export const PAYMENT_STATE_SENT = 0x02 | |
export const PAYMENT_STATE_CONFIRMED = 0x03 |
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
// just because its needed in template... | |
Array.prototype.mapToNum = function(){ | |
return this.map(v => parseFloat(v)) | |
} | |
Array.prototype.mapWithIdx = function(){ | |
return this.map((v, i) => ({ v, i })) | |
} | |
Array.prototype.filterByRegExp = function(regex){ | |
regex = new RegExp(regex.source); | |
const res = []; |
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
// just place this file where you want, then exec node with --experimental-modules --loader "path-to-loader.mjs" | |
import path from 'path'; | |
import process from 'process'; | |
import Module from 'module'; | |
import https from 'https'; | |
import os from 'os'; | |
import fs from 'fs'; | |
const __tmpdir = os.tmpdir(); |
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
(()=>{const __filename=(a=>{return `${a[a.length-3]}://${a[a.length-2]}`})((new Error('')).stack.split(/(\w+):\/\/(\S+):\d+:\d+/)),__dirname=(a=>{a.pop();return a.join('/')})(__filename.split('/'));(()=>{ | |
console.log([__filename, __dirname]) | |
})()})() |
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
#!/usr/bin/env node | |
const args = (shorts => { | |
var res = { | |
params: {}, | |
args: [] | |
}; | |
for(var i = 2; i < process.argv.length; i++){ | |
if(process.argv[i][0] == '-'){ | |
if(process.argv[i][1] == '-'){ | |
let [arg, ...val] = process.argv[i].slice(2).split('='); |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines or lines starting with space in the history. | |
# See bash(1) for more options | |
HISTCONTROL=ignoreboth |
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
2017/11/03 09:48:56 [TRACE] Log Mode: File (Trace) | |
2017/11/03 09:48:56 [ INFO] Gogs 0.11.29.0727 | |
2017/11/03 09:48:56 [ INFO] Cache Service Enabled | |
2017/11/03 09:48:56 [ INFO] Session Service Enabled | |
2017/11/03 09:48:58 [ INFO] Git Version: 2.15.0 | |
2017/11/03 09:48:58 [ INFO] Run Mode: Production | |
2017/11/03 09:48:58 [ INFO] First-time run install finished! | |
2017/11/03 09:48:58 [TRACE] Doing: CheckRepoStats | |
2017/11/03 09:49:52 [TRACE] Session ID: eaa0726005172017 | |
2017/11/03 09:49:52 [TRACE] CSRF Token: GzQbKG70RoFN9R6KaH8eQTaS9KE6MTUwOTcwMjUzMzMzODE0ODE5Mw== |