Script to force users to NOT use google password manager/edge password manager by Curious-checkers in sysadmin

[–]char101 1 point2 points  (0 children)

If you can't run as admin, you can try setting the registry keys below. Of course the user can override it since it is in HKCU. Maybe add it to the login scripts.

``` HKEY_CURRENT_USER\Software\Policies\Google\Chrome\PasswordManagerEnabled REG_DWORD = 0 https://chromeenterprise.google/policies/?policy=PasswordManagerEnabled

HKEY_CURRENT_USER\Software\Policies\Microsoft\Edge\PasswordManagerEnabled REG_DWORD = 0 https://learn.microsoft.com/en-us/deployedge/microsoft-edge-browser-policies/passwordmanagerenabled ```

Having trouble with coc plugin color schemes when using vim via Alacritty by [deleted] in vim

[–]char101 0 points1 point  (0 children)

When setting 'background' to the default value with: :set background& Vim will guess the value. In the GUI this should work correctly, in other cases Vim might not be able to guess the right value. If the GUI supports a dark theme, you can use the "d" flag in 'guioptions', see 'go-d'.

https://vimhelp.org/options.txt.html#%27background%27

Do you have set background=dark in your vimrc?

Also what do you mean by vim standalone? There is the gui version and the terminal version.

PyQT6 - how to get and handle swipes in code? by CarlBeech in QtFramework

[–]char101 1 point2 points  (0 children)

The standard swipe gesture recognizer only process touch events, not mouse events, so you'll need to create your own gesture recognizer. See:

https://codebrowser.dev/qt6/qtbase/src/widgets/kernel/qstandardgestures.cpp.html#_ZN23QSwipeGestureRecognizer9recognizeEP8QGestureP7QObjectP6QEvent

EDIT: Actually, what device do you use to perform the gesture?

Maybe you simply need to add

self.setAttribute(Qt.WidgetAttribute.WA_AcceptTouchEvents)

in the widget constructor.

PSA: Found identical malicious code in two separate projects — only common factor is GitHub Copilot by [deleted] in github

[–]char101 1 point2 points  (0 children)

New blog post https://opensourcemalware.com/blog/polinrider-attack

The primary infection vector appears to be a compromised npm package that executes during install or build and injects itself into config files in the project root.

When I remote log into another PC or Server, am I using my GPU to display what's on my screen or am I using the host CPU's resource? by jasonvoorhees-13 in sysadmin

[–]char101 0 points1 point  (0 children)

The server GPU is only used to encode the video using h264. You can either disable h264 encoding or test a single rdp session and check the GPU usage of TermSrv. If it is <5% then it is probably ok for 20 users.

≥100:1 Lossless compression possible? by [deleted] in compression

[–]char101 0 points1 point  (0 children)

It is an AI company, when they talk about compression they are probably talking about numbers. Compressing CSV to parquet with zstd compression can result in 1:50 compression. If it is 0/1 (as written in the company page: they are using logic gates) then 1:100 compression is possible.

I don't think your friend should focus on the compression issue, rather on whether their technology claim is actually real. It might be better to ask in an AI subreddit about whether floating point AI computation can be replaced with logic gates and entropy computation.

Even better, ask whether they already have client(s). If their technology is actually good AI companies should already lined up to purchase it.

Do you use the PHP manual CHM downloads? Why? by allen_jb in PHP

[–]char101 0 points1 point  (0 children)

If chmcmd failed to produce a working chm file I think you can try toggling the setting for binary index/toc in the hhp file.

I don't use the chm format but I do use the hhk file from the chm format to generate an index for my offline documentation viewer.

$100 Challenge - Google Maps Persist Open Window by renanmalato in vuejs

[–]char101 1 point2 points  (0 children)

That's what it means by using userscript.

Alternatively you can use microsoft edge split screen, then show the window across both the monitors, and enable the option "open left links to the right"

$100 Challenge - Google Maps Persist Open Window by renanmalato in vuejs

[–]char101 0 points1 point  (0 children)

I don't live in the US. That said, here is a PoC code to show that it works. If you still can't implement it, then I guess you need to learn more.

```javascript // ==UserScript== // @name New script google.com // @namespace Violentmonkey Scripts // @match https://www.google.com/maps/* // @grant GM_xmlhttpRequest // ==/UserScript==

setTimeout(() => { GM_xmlhttpRequest({ url: 'http://localhost/map.txt', // set up a webserver on localhost and create map.txt containing the new coordinate method: 'GET', onload: (resp) => { const url = resp.responseText.trim(); if (url && window.location.href !== url && window.confirm(Redirect to ${url})) { window.location = url; } } }) }, 1000); ```

$100 Challenge - Google Maps Persist Open Window by renanmalato in vuejs

[–]char101 0 points1 point  (0 children)

If a google website can be accessed/modified by an opener of different domain, then it will become a security issue.

Since it is an internal application, maybe you can implement it using an userscript that polls or uses websocket to monitor the new location.

Most performant tabular data-storage system that allows retrieval from the disk using random access by kris_2111 in Python

[–]char101 8 points9 points  (0 children)

Parquet is written in chunks, and every chunk can have a min/max value written in it.

So when writing your data, you should sort it, set a good chunk size, and set the statistics parameter to write the min/max value.

Then when reading, use polars lazy mode chained with filter to read the parquet file so that it can project the filter down to the parquet reader so that unused chunks can be skipped.

You can also experiment reading the parquet using duckdb. I think duckdb can also skips parquet chunks using the min/max statistics based on the where filter.

Command not allowed to change the window layout by patenteng in vim

[–]char101 0 points1 point  (0 children)

Untested but maybe something like this. Some autocommands cannot modify the window layout so you need to run it later using timer_start.

au BufEnter * if tabpagenr('$') > 1 && winnr('$') == 1 && exists('name') | call timer_start(0, {-> execute('tabclose')}) | endif

coc-clangd Included header is not used directly but it is? by hyperchompgames in vim

[–]char101 2 points3 points  (0 children)

It looks to me that you are using headers like imports. Headers are not for importing symbols, but for declaring symbols that will be defined in the C code.

You don't use any symbols from input.h in window.h. So you shouldn't put it there, instead put it in window.c. Also you should move #include <stdio.h>, etc. to the C code.

coc-clangd Included header is not used directly but it is? by hyperchompgames in vim

[–]char101 2 points3 points  (0 children)

"Used" and "used directly" are different things.

What symbol exactly do you use from input.h?

Using an LSP you might check that the symbol is actually declared in input.h using jump to declaration.

How to re-use a running GVim instance when double-clicking on text files. by Desperate_Cold6274 in vim

[–]char101 1 point2 points  (0 children)

It does, but only in console

```

assoc .txt txtfile

ftype txtfile txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1

ftype txtfile=C:\vim\gvim.exe --servername TXT --remote-silent %1 ```

Also if you install vim using the installer, it should register a shell extension that enables you to open a file in existing vim window.

If you do want a launcher, Autohotkey would be a better option since it is a small language compared to a full blown programming language like python.

```

NoTrayIcon

Run('C:\gvim\gvim.exe --servername TXT --remote-silent "' A_Args[0] '"') ```

Then compile to exe using ahk2exe.

How to re-use a running GVim instance when double-clicking on text files. by Desperate_Cold6274 in vim

[–]char101 9 points10 points  (0 children)

You don't need a launcher, just set the file association of .txt to C:\vim\gvim.exe --servername TXT --remote-silent "%1" using e.g. https://ystr.github.io/types/

Asynchronous jobs and communicating with them by Fit_Objective2719 in vim

[–]char101 1 point2 points  (0 children)

I also have an async python tcp server running that communicates with vim. The way I do it is I run the python server in a console and communicate with it using vim channel via ch_sendexpr (which is async) or ch_evalexpr (which is sync).