#Some discussions on logging from docker: Using logstash Using Papertrail
A lot of this boils down to whether you want a single or multi-process (systemd, supervisord etc.) container...
#Some discussions on logging from docker: Using logstash Using Papertrail
A lot of this boils down to whether you want a single or multi-process (systemd, supervisord etc.) container...
{ | |
"exceptionLogging": "STACKDRIVER", | |
"dataStudio": { | |
"name": "MongoDB via mlab API - acc40", | |
"company": "Account 4.0", | |
"companyUrl": "https://acc40.com", | |
"logoUrl": "https://next-scraft.appspot.com/images/scraft.ico", | |
"addonUrl": "https://medium.com/@jsat66/mongodb-connector-for-google-data-studio-part-1-%E0%B8%AA%E0%B8%B3%E0%B8%A3%E0%B8%A7%E0%B8%88-c35eac7f2bf4", | |
"supportUrl": "https://gist.github.com/jojosati/89652770b39fd147a2484e4baf13a5ee", | |
"description": "Universal MongoDB connector." |
<ul id="pages-block"> | |
<li v-for="page in pages"> | |
<a v-bind:href="page.url">{{page.name}}</a> | |
<debug :item="page"/> | |
</li> | |
</ul> | |
... | |
Vue.component('debug', { |
# create a file C:\Users\[user]\.bashrc | |
# add this content | |
# add your onw aliases or changes these ones as you like | |
# to make a dot (.bashrs) file in windows, create a file ".bashrs." (without extention) and save. windows will save it as ".bashrc" | |
alias ls='ls -alh' | |
alias cdnginx='cd /c/nginx && ls' | |
alias cdmcga='cd /c/Users/[user]/sbox/node/mcga && ls' | |
alias cdfood9='cd /c/Users/[user]/sbox/node/food9 && ls' | |
alias cdmysql='cd /c/nginx/mysql/bin && ls' |
let pancakeSwapAbi = [ | |
{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"}, | |
]; | |
let tokenAbi = [ | |
{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}, | |
]; | |
const Web3 = require('web3'); | |
/* | |
Required Node.js |
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |
import React, { Component } from 'react'; | |
export default function withPropsChecker(WrappedComponent) { | |
return class PropsChecker extends Component { | |
componentWillReceiveProps(nextProps) { | |
Object.keys(nextProps) | |
.filter(key => { | |
return nextProps[key] !== this.props[key]; | |
}) | |
.map(key => { |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
The thing is if your laptop cpu is getting really hot and you are trying to undervolt it then chances are 99% that there are no method to do so. I have also tried to do undervolt my Ryzen 7 5800H but no luck. Because the bios doesn't allow that much control over the cpu. I don't know the specific reasons for the manufactures to restrict such a great thing. But with this you can disable the Turbo Boost
. While this might sounds stupid but trust me you won't see a massive difference in performance after turned it off.