Scryptonite | 1 year ago | on: WebGPU-Based WiFi Simulator
Scryptonite's comments
Scryptonite | 1 year ago | on: Bun v1.1.22
(minor nit: release article says "Uint8Array.prototype.fromBase64()" when it's actually "Uint8Array.fromBase64()" per the code sample. Same for .fromHex)
Scryptonite | 7 years ago | on: YouTube will delete existing video annotations on January 15, 2019
Scryptonite | 7 years ago | on: Presidential Alerts
I think that pretty much speaks to how shamefully bad politics has gotten here in the US. I see a couple of comments that jump to speculate that it could be used as a tool of politics, or that they would rather opt-out of knowing about an imminent threat to themselves and/or their fellow American's lives. I think it's selfish, considering smoke and CO2 detectors can't warn you of nuclear attacks. If an office of the state was responsible for calling out a fire in the building, I would want every chance to be informed, regardless of whether or not they were my prefered elected official. Obviously, if the system was abused I would want it to be fixed.
Scryptonite | 7 years ago | on: Valid use cases for autocomplete=off
Last I checked you can always give Chrome a stronger hint not to autocomplete using something like this:
document.querySelectorAll("input[autocomplete=off]")
.forEach(element =>
element.autocomplete = window && window.chrome ? "hell-no-chrome" : "off"
);
I think it's a shame that they didn't design UI or something to coordinate with the user to override it in less well-behaved web apps. Instead, they just decided to ignore it completely.Scryptonite | 8 years ago | on: Mixing Vue.js templates with server-side templates can lead to XSS
If the result was too verbose, you can always handroll your own JS:
{{constructor.constructor(constructor.name.constructor.fromCharCode(97,108,101,114,116,40,39,120,115,115,39,41))()}}Scryptonite | 8 years ago | on: Mixing Vue.js templates with server-side templates can lead to XSS
I think another solution (besides v-pre) to "fixing" it (though you might say that relying on htmlspecialchars() to protect against user-supplied {{vue expressions}} was unwise to begin with) is to replace { and } with { and } after using htmlspecialchars/htmlentities.
EDIT: Another solution would be to pass a different set of delimiters to Vue that uses characters that would be escaped by htmlspecialchars, like demonstrated in [1] or like so:
Vue.options.delimiters = ['<%', '%>'];
[1]: https://stackoverflow.com/a/40538194/4522571Scryptonite | 8 years ago | on: How to write a JavaScript-free todo app using just HTML and CSS
CSS-only for this sort if thing is totally contrived, but making it still proved to be a fun little exercise.
[0]: https://codepen.io/scryptonite/pen/oLGzdj
[1]: https://github.com/you-dont-need/You-Dont-Need-JavaScript
Scryptonite | 8 years ago | on: Defending a website with Zip bombs
I presume the ones that gave out sooner were manually stopped by whoever maintains them or they hit some sort of memory limit. Good times.
Scryptonite | 9 years ago | on: Stretching the limits of CSS 3: Amazing creations in pure CSS
Scryptonite | 9 years ago | on: “autocomplete=off is ignored on non-login input elements”
I noticed that the Chrome team also developed a feature called Threaded scrolling in an attempt to improve site UX, but instead (or additionally?) completely ruins the ability to rely on onscroll/onmousewheel events (let alone being able to trust the values pulled from scrollLeft/scrollTop using requestAnimationFrame or similar). This can be seen on these two GIFs, with threaded scrolling enabled (currently the default behavior): https://gfycat.com/DiligentHomelyIndianelephant and with threaded scrolling disabled (behind a chrome flag): https://gfycat.com/SlimDefinitiveErin
The same flag/feature is active on mobile Chrome as well, so the same effect can be seen. The only way to guarantee jank-free work with scroll position (for parallax or w/e) is to implement handling user-input-to-scroll-behavior entirely yourself, which is rather unfortunate imo.
You can play with this yourself: http://jsbin.com/mohehotupe/edit (might need to click "Run with JS" / or tick "Auto-run JS" to start the scroll-listening script)
My take on autocomplete is that the standard says it's something I can disable, so autocomplete="off" is simply something the browser should obey. I have no problems with users using extensions or taking "advantage" of a browser setting to "fix" websites they say have abused this attribute. But there are valid use cases for disabling autocomplete as other comments have mentioned, and all they have done is make it to where I just have to do autocomplete="sudo-off" and it "works". But what happens when other webmasters misuse the attribute again? Might as well just toss support for it if they really can't trust the page to do the right thing.
Scryptonite | 10 years ago | on: IBM Watson's Visual Recognition Demo
Scryptonite | 11 years ago | on: Amazon Dash Button
Scryptonite | 12 years ago | on: Valve replaces Steam Controller touchscreen with new analog face buttons
Scryptonite | 12 years ago | on: Show HN: Add forms to your static site – no iFrames required
<form action="//api.formspree.com/user.smith/gmail.com">
Truthfully, base64 is probably better at deterring email harvesters.Scryptonite | 12 years ago | on: Learn You The Node.js
var a=process.argv,i=a.length,x=0;while(i>2)x-=-a[--i];console.log(x)Scryptonite | 12 years ago | on: IBM Watson fires its own cancer-fighting ‘moonshot’
Scryptonite | 12 years ago | on: Who exactly is crawling my site?
I've also noticed some of them used to make requests synchronously (waiting for the previous to finish before making another), but they have adapted to make requests in parallel and add timeouts so they don't have their time wasted quite as long.
I created a log of the ones who stayed connected the longest.
https://gist.github.com/scryptonite/5324724
I don't bother to maintain it anymore, but it was pretty interesting watching them change tactics over time.
Scryptonite | 12 years ago | on: Why I'm Planning to Kill W3Schools
They (help.dottoro.com) also have links (when available) to the Microsoft Developer Network, Mozilla Developer Network, Safari Developer Library, and the official W3C spec, which can be helpful. The only thing I would really change about their site is the URL structure. Completely nondescript and not user-friendly.
Once you move from using W3S to MDN or really anything else there is no going back.
CSS's display:
W3S: http://www.w3schools.com/css/css_display_visibility.asp
MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/display
Dottoro: http://help.dottoro.com/lchnsqsb.php
Scryptonite | 12 years ago | on: Ask HN: Why is Facebook indexed in search engine, against robots.txt rules?
EDIT:
Based on the comments in their robots.txt it appears that they are whitelisting certain robots. You would have to apply for your robot to crawl their site at https://www.facebook.com/apps/site_scraping_tos.php
They probably serve up unique generated robots.txt based on whitelisted robots. You'd never know what rules it contains unless you are a whitelisted robot.