Readit News logoReadit News
b2ccb2 commented on Web apps in a single, portable, self-updating, vanilla HTML file   hyperclay.com/... · Posted by u/pil0u
qingcharles · 24 days ago
I keep this bookmark in Chrome which lets me open an editor in a tab and Chrome maintains the state of the textarea even through reboots as long as you don't close the tab:

data:text/html,<html><head><title>Notepad</title><style>html,body{margin:0;padding:0;}textarea{padding:10px;font-family:Courier;font-size:16px;height:100%;width:100%;border:none;outline:none;}</style></head><body><textarea style="height:100%;width:100%;font-size:16px;padding:10px;"></textarea><script>document.getElementsByTagName('textarea')[0].focus()</script></body></html>

b2ccb2 · 23 days ago
You can get rid of the JS by setting the autofocus[1] attribute to the textarea.

[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

Deleted Comment

b2ccb2 commented on I use zip bombs to protect my server   idiallo.com/blog/zipbomb-... · Posted by u/foxfired
JodieBenitez · 4 months ago
The same, for Caddy: https://www.dustri.org/b/serving-a-gzip-bomb-with-caddy.html

10T is probably overkill though.

b2ccb2 · 4 months ago
Hilarious because the author, and the OP author, are literally zipping `/dev/null`. While they realize that it "doesn't take disk space nor ram", I feel like the coin didn't drop for them.

Think about it:

  $ dd if=/dev/zero bs=1 count=10M | gzip -9 > 10M.gzip
  $ ls -sh 10M.gzip 
  12K 10M.gzip
Other than that, why serve gzip anyway? I would not set the Content-Length Header and throttle the connection and set the MIME type to something random, hell just octet-stream, and redirect to '/dev/random'.

I don't get the 'zip bomb' concept, all you are doing is compressing zeros. Why not compress '/dev/random'? You'll get a much larger file, and if the bot receives it, it'll have a lot more CPU cycles to churn.

Even the OP article states that after creating the '10GB.gzip' that 'The resulting file is 10MB in this case.'.

Is it because it sounds big?

Here is how you don't waste time with 'zip bombs':

  $ time dd if=/dev/zero bs=1 count=10M | gzip -9 > 10M.gzip
  10485760+0 records in
  10485760+0 records out
  10485760 bytes (10 MB, 10 MiB) copied, 9.46271 s, 1.1 MB/s

  real    0m9.467s
  user    0m2.417s
  sys     0m14.887s
  $ ls -sh 10M.gzip 
  12K 10M.gzip

  $ time dd if=/dev/random bs=1 count=10M | gzip -9 > 10M.gzip
  10485760+0 records in
  10485760+0 records out
  10485760 bytes (10 MB, 10 MiB) copied, 12.5784 s, 834 kB/s

  real    0m12.584s
  user    0m3.190s
  sys     0m18.021s

  $ ls -sh 10M.gzip 
  11M 10M.gzip

Deleted Comment

Deleted Comment

b2ccb2 commented on Elementary OS 6 Odin   blog.elementary.io/elemen... · Posted by u/jdhawk
Mikeb85 · 4 years ago
Wow looks great. This fell off my radar for a bit, looking pretty nice now. Not gonna lie, having Gnome + Flatpak on Ubuntu LTS base already puts it near the top of my list, the styling and added usability features puts it over the top.

Ubuntu LTS base is also great for developers, as it seems most cloud images these days are just that. I've tried installing/building tools on other distros that I like more than Ubuntu but they always seem to use wonky options, libraries that are too old/new or in strange places, and I end up back at Ubuntu.

b2ccb2 · 4 years ago
FYI, it doesn't use Gnome. It uses it's own DE based on Vala/GTK+/libmutter.
b2ccb2 commented on A Linux sysadmin's introduction to cgroups   redhat.com/sysadmin/cgrou... · Posted by u/FedericoRazzoli
WestCoastJustin · 5 years ago
Yeah, funny how it all worked out. cgroups/namespaces powered simple LXC containers. Docker comes along and makes a nice workflow and package management system (wrapping cgroups/namespaces). Kubernetes comes along and makes a nice workflow/cluster management layer (wrapping Docker). Cloud providers come along and make a nice Kubernetes management layer (wrapping Kubernetes). Pretty crazy to see the evolution over the past few years.

This tech has completely changed the sysadmin landscape/job descriptions and sort of threw tons of gas the whole devops movement.

Disclaimer: I worked at both Docker & Google. Although not on this tech specifically. Opinions are my own here.

b2ccb2 · 5 years ago
Nitpick... LXC containers is the equivalent to saying the HIV virus, or more recently SARS-CoV-2 virus
b2ccb2 commented on PowerShell 7.0   devblogs.microsoft.com/po... · Posted by u/omiossec
ijidak · 6 years ago
> Typescript and C# have demonstrated that MS can design good languages

I would make a slight correction, Typescript and C# have proven that Anders Hejlsberg can design good languages, not MS.

Honestly, Hejlsberg is like the Midas of programming languages.

That man is a language designing genius.

He is the main designer behind:

Delphi (which inspired VB6, Microsoft's DOMINANT language through the 90's. But it's so similar to Delphi, that you can pretty much credit Hejlsberg for it's success), C#, and Typescript

Sometimes whole companies get credit for the genius of what is really just one or two architects.

When it comes to Apple innovations, it's Jobs

And when it comes to MS language innovations, with the exception of F#, it's Hejlsberg.

b2ccb2 · 6 years ago
s/Jobs/Wozniak/
b2ccb2 commented on Postgres Explain Visualizer   github.com/dalibo/pev2... · Posted by u/vishesh92
willvarfar · 6 years ago
Nice, but would be great if it could show it as a Gantt Chart too. The current display shows everything starting at the same time, so doesn’t estimate the total wall clock time.

Now are there similar explainers and visualizers for MySQL and Presto?

b2ccb2 · 6 years ago
There is MySQL Workbench, and a collection of Percona tools:

https://www.percona.com/blog/2018/03/01/visualize-this-mysql...

b2ccb2 commented on Postgres Explain Visualizer   github.com/dalibo/pev2... · Posted by u/vishesh92
alexott · 6 years ago
Adding to readme an example of generated output would be nice...
b2ccb2 · 6 years ago
Check the bottom of the README

For a complete example, see this codesandbox.

https://codesandbox.io/s/pev2-ry2dd

u/b2ccb2

KarmaCake day177July 6, 2018View Original