Forwarded from ASafaeirad
Forwarded from ASafaeirad
Today I Learned:
a super handy way to search through commit history to find exactly where a specific line or snippet was added or removed.
Read the article
#git #til
git log -Sa super handy way to search through commit history to find exactly where a specific line or snippet was added or removed.
Read the article
#git #til
Alexharri
Searching for and navigating Git commits
Exploring Git’s built-in tools for searching through and analyzing Git commit logs and diffs.
Forwarded from ASafaeirad
You can load env file in Node.JS using
https://nodejs.org/en/blog/release/v21.7.0#loading-and-parsing-environment-variables
#node #til #env
process.loadEnvFilehttps://nodejs.org/en/blog/release/v21.7.0#loading-and-parsing-environment-variables
#node #til #env
Forwarded from ASafaeirad
You can expose your localhost to internet using Cloudflare CLI.
https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/
#cloudflare #til
cloudflare tunnel --url localhost:porthttps://developers.cloudflare.com/cloudflare-one/connections/connect-networks/
#cloudflare #til
Cloudflare Docs
Cloudflare Tunnel · Cloudflare One docs
Cloudflare Tunnel provides you with a secure way to connect your resources to Cloudflare without a publicly routable IP address. With Tunnel, you do not send traffic to an external IP — instead, a lightweight daemon in your infrastructure (cloudflared) creates…
Forwarded from ASafaeirad
Forwarded from ASafaeirad
Amygdala hijack:
An amygdala hijack occurs when the brain's emotional center (the amygdala), overrides the rational thinking part (the prefrontal cortex) in response to a perceived threat or stressor. This results in an intense emotional reaction that feels automatic and often disproportionate to the situation.
#til
An amygdala hijack occurs when the brain's emotional center (the amygdala), overrides the rational thinking part (the prefrontal cortex) in response to a perceived threat or stressor. This results in an intense emotional reaction that feels automatic and often disproportionate to the situation.
#til
Forwarded from ASafaeirad
Cortical blindness, also known as cerebral blindness or cortical visual impairment, is a neurological condition where vision is lost due to damage in the occipital cortex of the brain, the part responsible for processing visual information, rather than in the eyes themselves.
This means the eyes are typically normal, and the condition can range from partial visual field deficits to complete blindness.
Some individuals with cortical blindness can still process emotional information, particularly from facial expressions and eye contact, as the amygdala, can still be activated in the absence of the visual cortex
#til
This means the eyes are typically normal, and the condition can range from partial visual field deficits to complete blindness.
Some individuals with cortical blindness can still process emotional information, particularly from facial expressions and eye contact, as the amygdala, can still be activated in the absence of the visual cortex
#til
Forwarded from ASafaeirad
Today I learned;
It was registered on March 15, 1985.
#til
symbolics.com was the first domain name ever registered in the history of the internet.It was registered on March 15, 1985.
#til
Forwarded from ASafaeirad
من امروز فهمیدم که بعضی فرآیندها توی لینوکس nice تر از بقیه هستن.
خیلی ساده بخوام بگم داستان اینه که هرچی فرآیند nice تر باشه بیشتر تعارف میکنه و اولویت و منابع رو به بقیه میده :))
بیشتر بخونید
https://www.gnu.org/software/coreutils/manual/html_node/nice-invocation.html#nice-invocation
https://man7.org/linux/man-pages/man1/nice.1.html
#linux #til #nice
خیلی ساده بخوام بگم داستان اینه که هرچی فرآیند nice تر باشه بیشتر تعارف میکنه و اولویت و منابع رو به بقیه میده :))
بیشتر بخونید
https://www.gnu.org/software/coreutils/manual/html_node/nice-invocation.html#nice-invocation
https://man7.org/linux/man-pages/man1/nice.1.html
#linux #til #nice
www.gnu.org
nice invocation (GNU Coreutils 9.8)
Next: nohup: Run a command immune to hangups, Previous: env: Run a command in a modified environment, Up: Modified command invocation [Contents][Index]
Forwarded from ASafaeirad
Forwarded from ASafaeirad
Forwarded from ASafaeirad
TIL: NPX Cheatsheet
https://www.nodejs-security.com/blog/mastering-npx-cheatsheet-npm-nodejs-power-users
#npx #til
https://www.nodejs-security.com/blog/mastering-npx-cheatsheet-npm-nodejs-power-users
#npx #til
NodeJS Security & NodeJS Secure Coding
Mastering NPX: A Cheatsheet for npm and Node.js Power Users
Explore unknown npx commands and tips to enhance your Node.js workflow. This cheatsheet covers everything from running packages without global installs to finding executable paths and using npx with specific Node versions.
Forwarded from ASafaeirad
Forwarded from ASafaeirad
TIL: Boolean coercion are different
Read more
#til #ecmascript
Note: Unlike other type conversions like string coercion or number coercion,
boolean coercion does not attempt to convert objects to primitives by calling user methods.
—MDN: Boolean: Boolean coercion
Read more
#til #ecmascript
Zach Leatherman
I want to intercept Boolean Coercion for Objects in JavaScript—zachleat.com
A post by Zach Leatherman (zachleat)
Forwarded from ASafaeirad
TIL:
You can listen for attribute changes on a DOM element using a
In my case, I needed to inspect a DOM element during a transient state that changed too quickly to catch manually.
Using DOM breakpoints wasn't helpful since the element was updated too frequently.
The solution was to use a
#til
You can listen for attribute changes on a DOM element using a
MutationObserver.In my case, I needed to inspect a DOM element during a transient state that changed too quickly to catch manually.
Using DOM breakpoints wasn't helpful since the element was updated too frequently.
The solution was to use a
MutationObserver to trigger specifically when a certain attribute changed.
const observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (
mutation.type === "attributes" &&
mutation.attributeName === "my-attribute") {
debugger;
}
});
});
observer.observe(element, { attributes: true });
#til