Skip to content

Instantly share code, notes, and snippets.

View luatnd's full-sized avatar
:octocat:
🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋

Luat Nguyen luatnd

:octocat:
🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋 🦋
View GitHub Profile
@ehsan18t
ehsan18t / processor-boost-mode.md
Last active April 4, 2024 01:58
Enable Processor Boost Mode Control in Advanced Power Settings

Enable Processor Boost Mode Control in Windows

Disable Turbo Boost to Reduce Power Consumption and Heat

Why Do We Need It?

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.

When You should Do It?

@Linch1
Linch1 / tokenPriceApi.js
Last active March 17, 2024 08:02
Retrive the price of any bsc token from it's address without using external service like poocoin/dextools
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
@FreddieOliveira
FreddieOliveira / docker.md
Last active April 25, 2024 12:24
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@jojosati
jojosati / appsscript.json
Last active March 27, 2023 20:26
MongoDB connector for Google Data Studio
{
"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."
@sorenlouv
sorenlouv / determine-changed-props.js
Last active April 18, 2024 16:21
Determine which props causes React components to re-render
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 => {
@Rebolon
Rebolon / vue.debug.js
Created November 5, 2016 20:50
A solution to use debugger in v-for for VueJS
<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', {
@vasanthk
vasanthk / System Design.md
Last active April 26, 2024 01:02
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@wzup
wzup / .bashrc
Last active May 17, 2023 00:49
alias for Git Bash on Windows
# 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'
@afolarin
afolarin / docker-log-gist.md
Last active March 16, 2023 13:02
docker-logs