Uncategorized

CORS error insecure private network

11. janvāris, 2023
You are developing localy on localhost and make xhr request from javascript to your locahost and get this CORS error: insecure private network This is chrome security feature. You can make xhr requests only from https To disable this change this config in Chrome chrome://flags/#block-insecure-private-network-requests
Read more ›
Uncategorized

ssh send_pubkey_test: no mutual signature algorithm

4. oktobris, 2022
Create or edit your ssh config file. This file is located at /home/{user}/.ssh/config Now add ssh config for host you cant connect It tells ssh client to use rsa algorithm when connecting to remote server. This happens when connecting to older ssh servers For realy old ssh servers try adding this line
Read more ›
Uncategorized

PHP max_input_vars

2. oktobris, 2022
PHPs configuration value max_input_vars When you are posting array to php with lots of elements in it, This config will determin how many of variables from array will be extracted. By default it is 1000. So if you have 1001 item in array, then only 1000 will be extracted It is also used by function …
Read more ›
Uncategorized

Linux how to find large directories

20. septembris, 2022
When you get message “no space left on device” you need to find where all free space gone. To do this I use command du – which stands for disk usage This command will tell size of directory it is run in I start investigating from root directory “/”. Add flag -d1 which tells du …
Read more ›
Uncategorized

Google maps very slow on chrome

11. septembris, 2022
Google maps on chrome is very slow on my windows 10 computer. In same time on Firefox google maps runs very smoothly. Tried to disable all plugins, no success Tried in incognito mode, no success Tried updating, waited few months maybe fix will come But nothing changes, google maps is very slow. Despite the fact …
Read more ›
Uncategorized

Connect to github.com from old linux

26. maijs, 2022
Use ecdsa key instead of rsa Configure ssh client to use this key when connecting to github.com Open your ssh config file and append these lines. Change to your home directory Now add content of file ~/.ssh/id_ecdsa.pub to github.com SSH keys section
Read more ›
Uncategorized

Cant read superblock while mount disk in linux

22. maijs, 2022
I have mechanical disk which runs 24/7. This night something happend in electricity grid after that my pc wont boot. Boot disk which is ssd and storage disk both where somehow damaged. I tried to mount hdd and got error: mount /dev/sda1 can’t read superblock Its scary because I dont know if it can be …
Read more ›
Uncategorized

Linux set time from cli

10. aprīlis, 2022
Read more ›
Uncategorized

MySql connect bash script from Laravel .env file

5. decembris, 2021
This is small bash scripts which reads Laravel .env configuration and connects to mysql database with mysql cli client tool. Instead of opening .env file and copy pasting mysq; connections credentials manually, run this bash script and connect to mysql database
Read more ›
Linux

About Arch Linux network devices names

9. septembris, 2021
I have been using linux for long time. That is why I remeber that network devices was named eth0, eth1 etc. Nowdays more and more I see that network devices are named like enp1s0. But I was not bothered about that and why its named as it is named. I didnt care. Just run command …
Read more ›
Wordpress

WordPress 5.8 media library Load more

9. augusts, 2021
So you upgraded to WordPress 5.8 which is good. But now in media library instead of infinity scroll there is button Load more and message Showing 40 of x media items. This is frustating because you have to press this button Load more every time just to get next fourty media items. To get rid …
Read more ›
Wordpress

WordPress how to force https ssl

21. jūlijs, 2021
If your WordPress site lives behinde https terminator, then even if user open WordPress throug https, WordPress will work as if it where open with http To avoid this you can put these lines in your wp-config.php to set globaly that server request is coming throug https By default WordPress checks if page is open …
Read more ›
Backend

Redis config and basic commands

19. decembris, 2020
File: /etc/systemd/system/redis-server Šeit vajag atrast rindiņuReadWriteDirectories=-/var/lib/redis Tās būs tās direktorijas, kurā redis var rakstīt savu datubāzes failu. Gadījumā, ja vajag uzstādīt citu direktoriju, kurā redis glabās savu db failu Jāskatās arī rindiņa #ProtectHome=yes Servera pārstartēšana redis-cli komandas ar kurām var noskaidro dir un fails vārds, kurā glabājas redis db Gadījumā, ja ir problēmas ierakstīt redis …
Read more ›
Toolbox

ssh append authorized_keys on remote server

26. novembris, 2020
This is how to copy local ssh public key and append it to authorized_keys file on remote server This commands consists of three (3) parts First copy content of ids_rsa.pub file Then pipe it to ssh. Connect to remote server with yout credentials And execute append command on remote server
Read more ›
Toolbox

Certbot custom validation

30. oktobris, 2020
Read more ›
Web development

List of links of developers blogs

29. aprīlis, 2020
https://francescodilorenzo.com/ https://blog.josephscott.org/ https://smakosh.com https://dyrynda.com.au https://calebporzio.com https://christoph-rumpel.com https://ryangjchandler.co.uk https://sebastiandedeyne.com https://divinglaravel.com https://www.alexwest.co https://n8finch.com https://blog.yongfook.com/ https://flaviocopes.com/ https://pociot.dev/ https://jessarcher.com/ https://timacdonald.me/ // Images cdn https://cloudinary.com/ // about vim https://blurha.sh/
Read more ›
Web development

Disable text selection with css

17. aprīlis, 2020
Apply these CSS rules to get rid of text selection Solution was found here https://stackoverflow.com/questions/826782/how-to-disable-text-selection-highlighting#4407335
Read more ›
Creations

PVN kalkulators

15. aprīlis, 2020
Kas ir PVN? PVN atšifrējas kā pievienotās vērtības nodoklis Pievienotās vērtības nodoklis (PVN) ir nodoklis, kas tiek pieskaitīts pie preces vai pakalpojuma tirgus vērtības naudas izteiksmē. Tas tiek piemērots visās Eiropas Savienības dalībvalstīs. Kas maksā PVN? PVN maksā preces vai pakalpojuma gala patērētājs. Privātpersonas maksā PVN preču iegādes vietā, piemēram, veikalā, kur PVN jau ir …
Read more ›
Toolbox

How to generate OpenSSL certificate and fingerprint

7. aprīlis, 2020
Generate openssl sha256 certificate Generate certificate fingerprint
Read more ›
Toolbox

Fix Android chrome remote debug on Windows

23. marts, 2020
Instruction on how to fix issue when android chrome device is not showing in chrome developer tools remote devices section. Windows
Read more ›
Wordpress

Gutenberg notes

5. marts, 2020
My notes on Wordpress Gutenberg. Mostly collection of usefull links
Read more ›
Creations

JavaScript color transition

6. augusts, 2019
Demo is here http://pad.darbs.xyz:8044/color-transition/examples/basic.html GitHub repositiory https://github.com/kasparsb/color-transition This library uses canvas element to generate gradient from provided color stops. You pass in transition progress value from 0 to 1 and library returns color This method is very accurate because of generated gradient. All kind of mathematical solutions works differently Here comes inline demo. If you …
Read more ›