Friday, December 23, 2022

Format Cpp code in Visual Code

 I had been convinced that you couldn't do this without installing clang, but it turns out that Microsoft wrote an extension that can format without using a heavyweight package.


C/C++ Extension Pack


Saturday, November 19, 2022

Djvu to Pdf on Ubuntu 22.04

sudo apt instll djvulibre-bin libdjvulibre21 okular-extra-backends evince libevdocument3-4 libevview3-3

sudo apt-get install libtiff-tools

thn in bash script:

for f in /home/evgeniy/Documents/books/*.djvu

do

  echo "$f"

  ddjvu -format=tiff $f $f.tiff

  tiff2pdf -j -o $f.pdf $f.tiff

done



thnfk you for answer and corrections

Friday, October 28, 2022

Debian on WSL

wsl --install -d debian

wget --no-check-certificate  https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb

sudo dpkg -i packages-microsoft-prod.deb

sudo apt-get update --fix-missing

sudo apt-get install -f #install with dependencies

sudo apt-get update

sudo apt-get install -y dotnet-sdk-5.0


but this not enoght, because I need to run code in a vm from github. to setup certificate:

sudo apt-get install --yes software-properties-common
sudo update-ca-certificates
sudo apt-get install socat -y
socat TCP4-LISTEN:4443,reuseaddr,fork PROXY:squidhost:github.com:443,proxyport=3128
openssl s_client -showcerts -servername github.com -connect github.com:443 </dev/null 2>/dev/null | sed -n -e '/BEGIN\ CERTIFICATE/,/END\ CERTIFICATE/ p'  > github.com.pem
cat github.com.pem | sudo tee -a /etc/ssl/certs/ca-certificates.crt
git config --global http."https://github.com.pem/".sslCAInfo ~/github.com.pem
git config --global http.sslverify false
export GIT_SSL_NO_VERIFY=true

Then this error is gone:

fatal: unable to access 'github.com/...': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

thank you for original post

Sunday, October 16, 2022

Retroarch setup

 

1. Retroarch BIOS Pack copy it content to C:\RetroArch-Win64\system

2. Download required cores for example for DOS and Nintendo SNES is menu
4. Load game rom









Wednesday, October 12, 2022

DisposableFixer for Visual Studio

 

 

Extension for everyday use, because usually I do not remember to dispose all object I created.  This great extension still not ported to Visual Studio 2022 but I can use with previous 2019 version.






Tuesday, October 11, 2022

Tuesday, October 4, 2022

How to track opened file in JetBrains Rider

 This iportant option in Visual studio I started to use from 2004, in JetBrains Rider 'Always Select Opened File' option is located in Project Viewer setting:




Monday, August 29, 2022

Fix apt update for Kali Linux on WSL

For lightweight Linux loatform hosted on Windows 10 it is better to use WSL

Avalibale ditstos not so large, but well flawored

PS C:\Windows\system32> wsl --list --online

The following is a list of valid distributions that can be installed.

Install using 'wsl --install -d <Distro>'.


NAME            FRIENDLY NAME

Ubuntu          Ubuntu

Debian          Debian GNU/Linux

kali-linux      Kali Linux Rolling

openSUSE-42     openSUSE Leap 42

SLES-12         SUSE Linux Enterprise Server v12

Ubuntu-16.04    Ubuntu 16.04 LTS

Ubuntu-18.04    Ubuntu 18.04 LTS

Ubuntu-20.04    Ubuntu 20.04 LTS

I need to insall Kali

wsl --install -d kali-linux

But of cource, the distro already little bit absolete in package refereces:

eugene@DESKTOP-78QLU8F:~$ sudo apt update

Get:1 http://kali.koyanet.lv/kali kali-rolling InRelease [30.6 kB]

Err:1 http://kali.koyanet.lv/kali kali-rolling InRelease

  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>

Reading package lists... Done

W: GPG error: http://kali.koyanet.lv/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>

E: The repository 'http://http.kali.org/kali kali-rolling InRelease' is not signed.

N: Updating from such a repository can't be done securely, and is therefore disabled by default.

N: See apt-secure(8) manpage for repository creation and user configuration details.


To fix this problem with brocken repo urls:


# download
wget http://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2022.1_all.deb
# install
sudo dpkg -i kali-archive-keyring_2022.1_all.deb
# remove downloaded file again
rm kali-archive-keyring_2022.1_all.deb
# update
sudo apt-get update

Thank you for an answer!

Tuesday, July 19, 2022

PENCIL UI prototyping free desktop app

format code in dotnet 3.1

dotnet tool install --global dotnet-format --version 3.1.37601 dotnet tool uninstall --global dotnet-format

Fyne on Windows 7

 For a cheap, obsolete environment I got a problem, fyne ui does not see my opengl. I remembered, the same problem appears for WFP, it also does not find hardfare graphics acceleration, but it is possible to run UI in software render mode. So do for fyne


after build app, copy software Mesa3D opengl.dll to folder with binaries, then it works.

This fix these crashes on start:


022/07/19 08:19:09 Fyne error:  failed to initialise OpenGL
2022/07/19 08:19:09   Cause: glGetBufferParameteri64v
2022/07/19 08:19:09   At: C:/Users/ep/go/pkg/mod/fyne.io/fyne/v2@v2.2.2/internal
/painter/gl/gl_core.go:67
Exception 0xc0000005 0x8 0x0 0x0
PC=0x0
signal arrived during external code execution

 

---------------------------
Fyne Error
---------------------------
Fyne error: window creation error
  Cause:APIUnavailable: WGL: OpenGL ES requested but WGL_ARB_create_context_es2_

profile is unavailable
  At: C:/Users/ep/go/pkg/mod/fyne.io/fyne/v2@v2.2.2/internal/driver/glfw/driver.go:148
---------------------------
ОК  
---------------------------

 

 I also recomend to compile fyne ui app with reduced drahics features to GLES

 

go build -tags gles .


Reference:

https://github.com/fyne-io/fyne/issues/191

https://github.com/fyne-io/fyne/issues/410

https://github.com/fyne-io/fyne/issues/437

https://github.com/fyne-io/fyne/issues/2046

https://stackoverflow.com/questions/57643992/how-to-install-opengl-for-this-to-run

https://www.pcgamer.com/microsoft-finally-ports-directx-12-to-windows-7-but-only-for-certain-games/

https://github.com/r4wand/go-fyne-desktop-app-demo



Saturday, July 16, 2022

Wednesday, June 15, 2022

Artefacts on the Moon

 

 

 Decade ago Arthur Berent wrote  album Artefacts on the Moon. A sound for a great preparation for a mining on the Moon by Abstract Avenue. Today Chinese Academy of Sciences added large map for future settlements. Map is large 196 Mb jpeg

Tuesday, May 17, 2022

Rosfuscator is Free obfuscator for .Net Core

After reading blog posts about bad progress of free obfuscation in .net core I get found it is possible to hardening of source code using Roslyn. After test if Rosfuscator I have decision variables will be hardened without compilcation errors, it is better then a nothing, classes and methods obfuscation produce compilcation erros. Thank you Melvin L for good work!




 

Friday, May 6, 2022

Fixed login to GitHub with Visual Code through grdp and vnc

Error is: Writing login information to the keychain failed with error 'Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached'. Fix is: gnome-keyring-daemon -r then enter your password for keyring. Thank you for post

Thursday, March 31, 2022

Thunderbird message filters parser

 Small lib for parse plain text in Thunderbirf messge filters file


https://www.npmjs.com/package/@remusao/thunderbird-msg-filters


or simply export filders to new workstation with instruction


http://kb.mozillazine.org/Filters_(Thunderbird)#Creating_and_editing_filters



Tuesday, March 29, 2022

copilot

 1. For first classes it did not realize context properly and it is good because he operate only names.

2. After read some logic that I use for app he can think logically already

3. For math equations he generateright code.

4. He start to know relations in object oriented model in time I wrote half of class decomposition

5. Lates class in screenshot he implemented without any moderation by his name. He dot the cnowledge about context and models to realize full group of rules and logic.



Despite a lot of jokes copilot from Microsoft works great for people that think.

Saturday, March 26, 2022

Thursday, March 24, 2022

Zed editor hotkeys

Best hotkey is Ctrl+. it opens dropdown with visual themes and other settings I did not know how to fill properly.

 Zendapp still availeble in Google App Store:


https://chrome.google.com/webstore/detail/zed-code-editor/pfmjnmeipppmcebplngmhfkleiinphhp


==============
Zed editor
==============
Where web site located

http://zedapp.org.s3-website-us-east-1.amazonaws.com/features/edit-remote-files/

Where GitHube page

https://github.com/zedapp/zed

-----------
To start editing files in this project press `Ctrl-E`.
If you prefer a tree view of your files, press `Ctrl-T`.
To find all available commands and keyboard shortcut press `Ctrl-.`

Useful keys
-----------

* `Ctrl-E`: Open or create a new file. Inside the picker:
    * In an empty box, press space to complete the directory of the currently open document.
    * Press `Up`/`Down` or `Tab`/`Shift-Tab` to walk over results.
    * Pressing `Return` either opens the selected file, or creates a new file with the name you typed in if none currently exists.
* `Ctrl-.`: Run an editor command.
* `Ctrl-T`: Show file tree. Keys used with tree active:
    * `Up`: Move up in the tree
    * `Down`: Move down in the tree
    * `Left`: Collapse node
    * `Right`: Expand node
    * `Enter`: Open file
* `Ctrl-F`: Find within file, after pressing `Enter` to select thie first match, use `Ctrl-G` to find next match, or `Ctrl-Alt-F` to put cursors on all.
* `Ctrl-1`: 1 split
* `Ctrl-2`: 2 vertical splits (press repeatedly to cycle between split sizes)
* `Ctrl-3`: 3 vertical splits
* `Ctrl-P`: Preview split (press repeatedly to cycle between split sizes)
* `Ctrl-0`: switch focus from one split to the next.
* `Tab` (following an identifier): complete code. In completion mode:
    * `Tab`/`Down`: Select next completion
    * `Shift-Tab`/`Up`: Select previous completion
    * `Enter`: Pick selected completion
    * `Esc`: Close completion box
* `Command-,`: open the preferences UI.

=======================
Zedrem server
=======================

http://zedapp.org.s3-website-us-east-1.amazonaws.com/features/edit-remote-files/

Tuesday, March 22, 2022

Saturday, March 19, 2022

Kafka on Ubuntu 20.04

I used this post:

https://www.digitalocean.com/community/tutorials/how-to-install-apache-kafka-on-ubuntu-20-04

but I downloaded latest Kafka for me:

 https://downloads.apache.org/kafka/3.1.0/

Then I started to install zookeeper with simple article, but service was not started:

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-an-apache-zookeeper-cluster-on-ubuntu-18-04

Then I found this Knowledge Base with script:

https://kb.altinity.com/altinity-kb-setup-and-maintenance/altinity-kb-zookeeper/install_ubuntu/

Screept looks good, but zookiper command was not waitlisted, a fix is from answer:

https://stackoverflow.com/questions/62667788/how-do-i-initialize-the-whitelist-for-apache-zookeeper

A configuration should be in sub folder:

cat <<EOF | sudo tee /opt/zookeeper/zookeeper.properties

initLimit=20

syncLimit=10

maxSessionTimeout=60000000

maxClientCnxns=2000

preAllocSize=131072

snapCount=3000000

dataDir=/var/lib/zookeeper/data

dataLogDir=/var/lib/zookeeper/logs # use low-latency disk!

clientPort=2181

#clientPortAddress=nthk-zoo1.localdomain

autopurge.snapRetainCount=10

autopurge.purgeInterval=1

4lw.commands.whitelist=*

EOF

The latest for enable Kafka is disable auto generated cluster to use simple mode:

https://stackoverflow.com/questions/67705738/problem-with-kafka-failed-with-result-exit-code-status-1-failure



CudaText

 


Fix for warning:

Gtk-Message: Failed to load module "canberra-gtk-module"
sudo apt-get install libcanberra-gtk-module libcanberra-gtk-module:i386

Notepadqq is Notpad++ for linux

 


Guitar

 


https://github.com/soramimi/Guitar/releases

GitVine

 


https://insanesharpness.gitlab.io/GitVine/

Gitnu

 





Gantt Mono Tracker

 






Friday, March 4, 2022

Connect to local bare metal with ssh and vnc

1. Open your router admin panel and go to status of LAN connection to see IP of your bare metal.

2. Setup PuTTY and login by ssh

vncserver -localhost no


Starting applications specified in /etc/X11/Xvnc-session

Log file is /root/.vnc/evgeniy-X9SCL:1.log


Use xtigervncviewer -SecurityTypes VncAuth -passwd /root/.vnc/passwd :1 to connect to the VNC server.


3. Open log file to see a port to connect

cat /home/evgeniy/.vnc/evgeniy-X9SCL:7.log

Xvnc TigerVNC 1.10.0 - built Apr  9 2020 06:49:31
Copyright (C) 1999-2019 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12008000, The X.Org Foundation


Thu Mar  3 20:36:42 2022
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5907
 vncext:      created VNC server for screen 0
xrdb: No such file or directory
xrdb: can't open file '/home/evgeniy/.Xresources'

New 'evgeniy-X9SCL:8 (evgeniy)' desktop at :8 on machine evgeniy-X9SCL

Starting applications specified in /home/evgeniy/.vnc/xstartup
Log file is /home/evgeniy/.vnc/evgeniy-X9SCL:8.log

Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /home/evgeniy/.vnc/pas


Thu Mar  3 20:36:45 2022
 TcpSocket:   unable to get peer name for socket
 TcpSocket:   unable to get peer name for socket
 Connections: accepted: ::0
 TcpSocket:   unable to get peer name for socket
 VNCSConnST:  closing ::0: write: Connection reset by peer (104)
 EncodeManager: Framebuffer updates: 0
 EncodeManager:   Total: 0 rects, 0 pixels
 EncodeManager:          0 B (1:-nan ratio)
 TcpSocket:   unable to get peer name for socket
 Connections: closed: ::0
 ComparingUpdateTracker: 0 pixels in / 0 pixels out
 ComparingUpdateTracker: (1:-nan ratio)

Thu Mar  3 20:37:59 2022
 TcpSocket:   unable to get peer name for socket
 TcpSocket:   unable to get peer name for socket
 Connections: accepted: ::0
 TcpSocket:   unable to get peer name for socket
 VNCSConnST:  closing ::0: write: Connection reset by peer (104)
 EncodeManager: Framebuffer updates: 0
 EncodeManager:   Total: 0 rects, 0 pixels
 EncodeManager:          0 B (1:-nan ratio)
 TcpSocket:   unable to get peer name for socket
 Connections: closed: ::0
 ComparingUpdateTracker: 0 pixels in / 0 pixels out
 ComparingUpdateTracker: (1:-nan ratio)
Warning: VNC extension does not support -reset, terminating instead. Use -norese

Thu Mar  3 20:40:53 2022
 ComparingUpdateTracker: 0 pixels in / 0 pixels out
 ComparingUpdateTracker: (1:-nan ratio)

Xvnc TigerVNC 1.10.0 - built Apr  9 2020 06:49:31
Copyright (C) 1999-2019 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12008000, The X.Org Foundation


Fri Mar  4 21:50:24 2022
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5907
 vncext:      created VNC server for screen 0
xrdb: No such file or directory
xrdb: can't open file '/home/evgeniy/.Xresources'

4. Install tigervnc

5. Connect with vnc client

"C:\Program Files (x86)\TigerVNC\vncviewer.exe" -FullScreen  -SecurityTypes VncAuth 192.168.1.109::5907



Saturday, February 26, 2022

LazPaint tiny Gimp alternative

In these difficult days for Ukraine, any computer might help to write code and edit images. But most computers in Ukraine are very weak for Gimp. A program written in Pascal LazPaint run wery fast on week and outdated hardware.

debug magazine archive

  71 jounals still available on issuu with great story of netlabels time.  debug_mag Publisher Publications - Issuu