Why? Less code is sent down the wire to the user ("the client," the browser). This means faster page load times since it's less code. As a principle, a smaller and flatter DOM structure is going to perform better in the browser. In general, the larger the DOM node tree, the slower, manipulations to the structure will be more expensive by the browser's layout system.
If a user is browsing videos on YouTube.com from a web browser on a higher-end device (e.g., VR headsets), the user has to manually override the playback quality of a video through the playback-controls bar at the bottom of the video: Settings > Quality.
- Load a YouTube video. Example: https://www.youtube.com/watch?v=ELU-43DMNT4
- Then paste some of this code in the DevTools' Console.
- You'll notice the quality changes to the highest available for the video.
This file contains 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
function stripHtmlComments(html) { | |
// Remove HTML comments (useful for removing developer-facing comments from production HTML markup). | |
return html.replace(/<!--[\s\S]*?(?:-->)/g, ''); | |
} |
This file contains 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
var allowedEvents = { | |
'KeyboardEvent': [ | |
'input', | |
'keydown', | |
'keypress', | |
'keyup' | |
], | |
'MouseEvent': [ | |
'click', | |
'contextmenu', |
- https://github.com/opencollective/opencollective-frontend
@formatjs/intl-relativetimeformat
@material-ui/core
@opencollective/taxes
@rebass/grid
@sentry/browser
@sentry/node
@styled-icons/boxicons-regular
@styled-icons/fa-brands
@styled-icons/fa-solid
This file contains 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
* { | |
outline: 2px dotted red; | |
} | |
* * { | |
outline: 2px dotted green; | |
} | |
* * * { | |
outline: 2px dotted orange; | |
} | |
* * * * { |
This file contains 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 os = require('os'); | |
// See docs: https://nodejs.org/api/os.html | |
const usage = {}; | |
usage[`require('os').type()`] = { | |
value: os.type(), | |
otherValues: [ | |
'Linux', 'Darwin', 'Windows_NT' | |
], |
This file contains 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
# Command: | |
adb shell am start -n "com.oculus.vrshell/.MainActivity" -d apk://com.oculus.browser -e uri https://aframe.io/aframe/examples/showcase/spheres-and-fog/ | |
# Output: | |
09-22 03:59:12.368 3820 20762 I ActivityManager: START u0 {act=null typ=null flg=0x10000000 cmp=ComponentInfo{com.oculus.vrshell/com.oculus.vrshell.MainActivity}} from uid 2000 on display 0 | |
09-22 03:59:12.375 3820 20762 W ActivityManager: GearVR not ready: not allowed to start VR Activity. activity=ComponentInfo{com.oculus.vrshell/com.oculus.vrshell.MainActivity} intent=Intent { dat=apk://com.oculus.browser flg=0x10800000 cmp=com.oculus.vrshell/.MainActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 } (has extras) } isVrActivity=true | |
09-22 03:59:13.024 10937 10959 V VRSVC : (LogEvent.java:206) yTqX [onLaunchCancelled reason=hmt pIntent=Intent { dat=apk://com.oculus.browser flg=0x10800000 cmp=com.oculus.vrshell/.MainActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 |
This file contains 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
#!/bin/bash | |
# If you like this script and my work on libimobiledevice, please | |
# consider becoming a patron at https://patreon.com/nikias - Thanks <3 | |
REV=1.0.12 | |
if test -x "`which tput`"; then | |
ncolors=`tput colors` | |
if test -n "$ncolors" && test $ncolors -ge 8; then |
a clever workaround to debug secrets in gh actions https://stackoverflow.com/a/71165973
echo ${{secrets.mysecret}} | sed 's/./& /g'