Quantcast
Channel: User Sergey Ponomarev - Stack Overflow
Browsing latest articles
Browse All 58 View Live
↧

Comment by Sergey Ponomarev on Favicon not displaying on Safari

After tests for all browsers on all platfroms I came up with the solution: ``` <link rel="icon" href="/favicon_48.png" sizes="48x48"> <link rel="icon" href="/favicon.svg" sizes="any"> ```

View Article


Comment by Sergey Ponomarev on Difference between NewChannel vs Request in...

The OpenSSH client sends keep alive pings to the global reqs. So I responding to them instead of just disqarding. Interesting that the Dropbear ssh also sends keep alive but in a session

View Article


Comment by Sergey Ponomarev on How to use pako.js javascript? Pako is not...

You can include the pako from CDN jsdelivr.com/package/npm/pako

View Article

Comment by Sergey Ponomarev on Where to define Build Tags in Goland from...

I specified globally in Settngs / Go / Build tags / Custom Tags and in the run dialog just checked the Use all custom build tags

View Article

Comment by Sergey Ponomarev on How to get the Uri for the aws:lambda function...

It looks like the 2015-03-31 can be any, is anywhere explained what it is?

View Article


Comment by Sergey Ponomarev on How to restrict who can merge to master on a...

I made a demo of how this setup works youtube.com/watch?v=Ci1YLRieq7Y

View Article

Comment by Sergey Ponomarev on Can I use a SVG toolbar icon?

FF now supports the SVG developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensio‌​ns/…

View Article

Comment by Sergey Ponomarev on Launch Bootstrap Modal on Page Load

2024 update: nothing works except of JS $("#myModal").modal('show')

View Article


Comment by Sergey Ponomarev on Module socket not found lua

Please note that you should avoid this as import in the Lua scripts: medium.com/@fabricebaumann/…

View Article


Answer by Sergey Ponomarev for Dyndns2 protocol specification?

The RFC 2136 spec is an extension of the DNS itself and used by nsupdate command. It's complicated and is used by sysadmins.Routers are using just a plain HTTP GET requests to some DDNS provider. Their...

View Article

Answer by Sergey Ponomarev for How to get the list of timezones supported by...

The query returns time zones grouped by offset so that it will be easier to chose:SELECT utc_offset, is_dst, ltrim( trim(string_agg(distinct (CASE WHEN abbrev NOT LIKE '+%' AND abbrev NOT LIKE '-%' AND...

View Article

Answer by Sergey Ponomarev for How to marshal json string to bson document...

A simple converter that uses go.mongodb.org/mongo-driver/bson/bsonrw:func JsonToBson(message []byte) ([]byte, error) { reader, err := bsonrw.NewExtJSONValueReader(bytes.NewReader(message), true) if err...

View Article

Answer by Sergey Ponomarev for select list is not in group by clause and...

You have an SQL query with grouping but you selecting all columns without grouping aggregation.It's like you have a query:SELECT palletpart, location, supplier_code, qty, OTHER_COLUMNFROM...

View Article


CPU cache friendly byte slice

I have a logger that writes a lot of messages in parallel to stdout. The problem is that messages were written simultaneously and shuffled.So I had to add a mutex and lock before...

View Article

Answer by Sergey Ponomarev for Can Spring Boot serve precompressed assets

As far I know you haven’t such possibility but you can do this quite easily yourself. I think this is actually should be implemented on Tomcat or Jetty level. If you implemented the filter then please...

View Article


Answer by Sergey Ponomarev for Browser based WebDAV client?

Not directly from a browser but there is a nice Chrome App File Management - WebDav. It's not fully translated from Chinese so here is hint: Press Add+ and in Service Provider select the last item 自定义...

View Article

Answer by Sergey Ponomarev for Regular 401 & 405 errors from apache webdav...

401 is not really an error but uthentificatiob prompt. When a browser or other http/webdav client see the 401 status code it will ask a user for credentials and then send them in header Authorization:...

View Article


Answer by Sergey Ponomarev for How to make uploading multiple files with...

It's a same as for a regular http requests. You can call them in parallel, then you need to use Connection: keep-alive or use HTTP2.The WebDAV doesn't support bulk uploads on a specification level. So...

View Article

Answer by Sergey Ponomarev for get a file from a webdav directory with...

If your JS is on the same domain (origin) e.g. you fetching the file from your site then you don't need CORS. But if you wish to download/get the file feom other website thalen that site should allow...

View Article

Answer by Sergey Ponomarev for Tomcat webdav behind IIS Reverse proxy

The IIS is not a best option, usually nginx is used as a reverse proxy.It would be easier to you to find docs.Also the Tomcat is probably not a best option too. The de facto standard in Apache...

View Article

Answer by Sergey Ponomarev for is there an opposite to curl or wget to upload...

rclone allows to do that.See other options https://github.com/stokito/awesome-webdav#cli

View Article


Answer by Sergey Ponomarev for How to configure Stunnel to connect to a...

No, the stunnel works only on a transport level and doesn't try to analyze packets. But this may be a good addition to it and shouldn't be that difficult. You may propose the change or pay to it's...

View Article


Answer by Sergey Ponomarev for CGI not working with httpd server on busybox...

You just have a wrong file name: you called it testcgi but calling cgitest.I'll recommended to rename it to test.cgi or even test.sh. If the cgi script is main e.g. like index.php then you can call it...

View Article

Answer by Sergey Ponomarev for How do I send this specific curl WebDAV...

Are you on windows terminal, right?The command that you tried is for Linux/UNIX. There is a difference.On Win you can install Git and it also will install bash terminal which is the same as in...

View Article

Answer by Sergey Ponomarev for install java on linux busy box distro arm32V7

The Eclipse Temurin makes builds of TLS versions for the arm32v7 platform.Your Linux may be compiled with musl library instead of gnu. Then you can try OpenJDK 8 from Alpine Linux.The OpenWrt is also...

View Article


Answer by Sergey Ponomarev for Java on OpenWrt/DD-WRT

The Alpine Linux is also based on musl library so you may try to download the OpenJDK from their repository.Here is a sample how to install OpenJDK 8 to Turris Omnia...

View Article

Answer by Sergey Ponomarev for What is the file with .p8 extension? (APNs...

This is a private key most likely in PEM format.The file type extension is described in IANA application/pkcs8.The extension is defined in RFC 5958:.p8 files are sometimes PEM-encoded. When .p8 files...

View Article

Answer by Sergey Ponomarev for Store key in compact form

You can try Elliptic Curve (ECC) keys which are mush smaller:openssl genpkey -out small.pem.p8The size of the PEM key is 119 bytesYou can also output to a raw DER form:openssl genpkey -out small.der.p8...

View Article

Answer by Sergey Ponomarev for How ETags are generated and configured?

Overview of typical algorithms used in webservers.Consider we have a file withSize 1047 i.e. 417 in hex.MTime i.e. last modification on Mon, 06 Jan 2020 12:54:56 GMT whichis 1578315296 seconds in unix...

View Article



Answer by Sergey Ponomarev for awscli-local error: cannot import name...

In my case in Ubuntu I had installed the awscli with apt. I removed it and installed with pip instead and it worked:sudo apt remove awsclipip install awscli

View Article

Answer by Sergey Ponomarev for Golang: tests and working directory

Here is function to find a root project directory that contains .git folder:import ("os""path/filepath")func FindProjectDir() string { // Test can be started from command line in project folder or in...

View Article

Answer by Sergey Ponomarev for Block access with https ipaddress on nginx

You may try to add a regexp by Host that will drop IPs and require domains:server { listen 80; # skip raw IP as host e.g. require at least one letter (same for Punycode) if ( $http_host !~*...

View Article

Answer by Sergey Ponomarev for There is a similar function json_merge_patch()...

For the JSONB fields you can use the concatenation operation ||.Here is a sample that I made to make an upsert with merging of field:INSERT INTO table_name (id, title, po_document)VALUES ($1, $2,...

View Article


Comment by Sergey Ponomarev on install4j-runtime 10.0.8 dependency is not...

It would be really great if you can upload the jar to Maven Central

View Article

Comment by Sergey Ponomarev on Why rsync uses mkdir without p option

Does anyone created this as a feature request (or even bug)? This is clearly unexpected and bad behavior.

View Article

Answer by Sergey Ponomarev for Format a float to n decimal places without...

We must trim those zeros ourselves. We can use TrimRight(priceStr, "0."), but I've written a faster trimmer:func formatPrice(price float32) string { // truncate to 3 digits after point priceStr :=...

View Article


Answer by Sergey Ponomarev for In my python code I Cant Connect to an...

You need to enable logging of a connection error. With high chances there is required TLS by default but your server (local?) doesn't have the TLS enabled.Check the slixmpp.connect()...

View Article


Answer by Sergey Ponomarev for How to make xmpp request on port 443 or 80?

You need to use BOSH i.e. XMPP over WebSockets

View Article

Comment by Sergey Ponomarev on SSH Tunnel MySQL Connection with...

FYI: You may forward remote UNIX socket to a local port like: ssh -N -L 127.0.0.1:5000:/var/run/mysqld/mysqld.sock sshuser@remotehost Then you connect a mysql client to the local IP 127.0.0.1 and port...

View Article

Answer by Sergey Ponomarev for Adjust width and height of iframe to fit with...

If you can control both IFRAME content and parent window then you need the Iframe-Resizer.This library enables the automatic resizing of the height and width of both same and cross domain iFrames to...

View Article

Answer by Sergey Ponomarev for How to get deb package from Java gradle...

You can use the plain debian folder with debuild command.As a quick start to create the debian folder you can use the debmake that will add all basic files:debmake -u 1.0.0 -nThen edit those files...

View Article


Comment by Sergey Ponomarev on Hiding manifest entries with maven

This must be accepted as an answer. But the option was added in the recent version of the maven-jar-plugin so you may need to upgrade it first

View Article

Answer by Sergey Ponomarev for How to configure http_upload error for prosody

The Prosody now has a new module mod_http_file_share instead of the mod_http_upload.So check it's docs.

View Article


Comment by Sergey Ponomarev on Wrong encoding after activating resource...

FYI: Starting from Maven 4 the sourceEncoding is UTF-8 by default

View Article

Comment by Sergey Ponomarev on Getting Java version at runtime

I have JRE version 23-ea so this parsing fails. Use Runtime.version() instead

View Article

Browsing latest articles
Browse All 58 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>