As we were preparing Playwright 1.1.0, I learned quite a lot about Web Proxies. Below is the summary of my findings.
There are two groups of proxies that drive internet:
As we were preparing Playwright 1.1.0, I learned quite a lot about Web Proxies. Below is the summary of my findings.
There are two groups of proxies that drive internet:
| new Intl.NumberFormat(undefined, { | |
| notation: 'compact' | |
| }).format(12200); | |
| // "12K" | |
| new Intl.NumberFormat(undefined, { | |
| notation: 'compact' | |
| }).format(12534200); | |
| // "13M" |
| <? | |
| // str_replace removes the JS part and makes it into a normal JSON file | |
| $followers=json_decode(str_replace('window.YTD.follower.part0 = ','',file_get_contents(__DIR__.'/followers.js')),true); | |
| echo "\n\n"; | |
| echo number_format(count($followers)).' followers'; | |
| echo "\n\n"; |
A brief example on how to use npx to run gist based scripts.
Read the article here https://neutrondev.com/npm-vs-npx-whats-the-difference/ or watch it on YouTube https://www.youtube.com/watch?v=fSHWc8RTJug
| // Create a dummy analytics object until real loaded | |
| window.analytics || (window.analytics = []); | |
| window.analytics.methods = ['identify', 'track', 'trackLink', 'trackForm', 'trackClick', 'trackSubmit', 'page', 'pageview', 'ab', 'alias', 'ready', 'group', 'on', 'once', 'off']; | |
| window.analytics.factory = function(method) { | |
| return function() { | |
| var args = Array.prototype.slice.call(arguments); | |
| args.unshift(method); | |
| window.analytics.push(args); | |
| return window.analytics; | |
| }; |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| Hey All, | |
| I am P.B.Surya.Subhash, a 17 Year coder,hacker and a student. | |
| Recently I happen to see so many posts regarding this " Google XSS Challenge " and i was fortunate enough to complete them.. | |
| These are the solutions for the challenges ;) | |
| ############################################################################## | |
| Level 1: Hello, world of XSS | |
| https://xss-game.appspot.com/level1/frame | |
| query=<script>alert('xss')</script> |
| # Assuming an Ubuntu Docker image | |
| $ docker run -it <image> /bin/bash |