2020 m. gruodžio 18 d., penktadienis

git branch

Change branch to different commit
$ git branch -f bugFix <commit hash>

# Deleting branch
$  git push origin --delete gh-pages

Change master to commit
$ git reset <commit hash>

Move head up 2 commits
$ git checkout HEAD~2

Kaip suspausti pdf failus?


Neevia PDF tools

http://convert.neevia.com/pdfcompress/


Komandos
$ convert -background white -alpha remove web.pdf filename.jpg
$ convert -quality 30 -density 300x300 web.pdf rimi-11-%d.jpg


#konvertuoja is pdf i png geru santykiu
http://pdf2png.com/ 




Router wzr600dhp2 firmware upgrade

New firmware

https://dd-wrt.com/support/other-downloads/?path=betas%2F2020%2F07-08-2020-r43711%2Fbuffalo_wzr-600dhp2%2F

https://wiki.dd-wrt.com/wiki/index.php/Index:FAQ#Which_router_should_I_buy.3F
ftp://ftp.dd-wrt.com/betas/


Glossary

https://wiki.dd-wrt.com/wiki/index.php/Basic_Wireless_Settings#Regulatory_Mode

The standard (std) distribution includes all features, with the exception of VOIP. 

The standard-nokaid (std-nokaid) distribution includes all features of standard, with kaid removed to free some flash space. The VOIP distribution includes all features, with kaid removed to make room for Milkfish. The VPN edition includes OpenVPN but does not include IPv6, CIFS client, or kaid. 

The micro edition is a stripped down version designed for the WRT54G v5 and other 2MB router models.


Old firmware (manufacturer):

DD-WRT v24SP2- (04/21/14) std
(SVN revision 23709a)

2020 m. gruodžio 17 d., ketvirtadienis

Logitech 400r function key swap

Function key swap for Windows 10:


Download SetPoint 





OpenVPN

VPN

VPN stands for “virtual private network.” 

VPN protocols:

  • IKEv2 - the fast favorite on mobile OS.
  • OpenVPN - a reliable open-source classic.
  • Shadowsocks - top choice in restrictive countries.
  • WireGuard® - modern and secure solution.


Pros

  •     Hide from prying eyes on the internet
    • Avoid ISP throttling.
    • Get the best deals for online shopping.
    • Access blocked content (websites and apps).
  •     Browse the internet securely 
    • Stay safe on public wifi.
    • Safely share and download files.  


An IPsec

IPsec is a collection of protocols. Internet Protocol Security.

IPsec protocols are usually grouped by the tasks they do: 
  • Authentication Headers 
  • Encapsulating Security Payloads (ESP)
  • Security Associations (SA)
    • And IKEv2 (Internet Key Exchange version 2)

An IPsec VPN is one that uses the IPsec protocol to establish a VPN connection.

IPsec: transport mode vs. tunnel mode


TLS

 HTTPS is an implementation of TLS encryption on top of the HTTP protocol, which is used by all websites as well as some other web services. Any website that uses HTTPS is therefore employing TLS encryption.


What does TLS do?

  •     Encryption: hides the data being transferred from third parties.
  •     Authentication: ensures that the parties exchanging information are who they claim to be.
  •     Integrity: verifies that the data has not been forged or tampered with.



Certificate Authority (CA) 


 PKI (public key infrastructure). The PKI consists of:

  • a separate certificate (also known as a public key) and private key for the server and each client, and
  • a master Certificate Authority (CA) certificate and key which is used to sign each of the server and client certificates.



Compression

By default, OpenVPN doesn't enable compression. This script provides support for LZ0 and LZ4 (v1/v2) algorithms, the latter being more efficient.

However, it is discouraged to use compression since the VORACLE attack makes use of it.

TLS version

OpenVPN accepts TLS 1.0 by default, which is nearly 20 years old.

With tls-version-min 1.2 we enforce TLS 1.2, which the best protocol available currently for OpenVPN.

TLS 1.2 is supported since OpenVPN 2.3.3.




Openvpn


openvpn install script:


$ root@debian:~#  cat /etc/debian_version
9.8

# List of connected users
$ tail  /var/log/openvpn/status.log
$ tail -f -n 15 /var/log/openvpn/status.log
$ watch -d tail  /var/log/openvpn/status.log

# Telnet 25 port test
$ telnet  mx-a.delfi.lt 25
Exiting  Ctrl+] 
Telnet > close



 # Statusas apie Userius:
tail  /var/log/openvpn/status.log
watch -d tail  /var/log/openvpn/status.log


ngix


sudo apt install nginx -y
sudo apt-get install php-fpm

# Change ngix config
nano /etc/nginx/sites-available/default

# Test configurations
nginx -t

php



# Restarting service
$ systemctl restart php7.0-fpm.service

# Configure php
$ nano /etc/php/7.0/fpm/php.ini



<html>
<title>VPN</title>
<body>
<?php include_once '/var/www/html/vpn-parser.php';
$file="vpn_status.log";
$users = parseLog($file);


foreach($users['users'] as $user) {
  echo $user['name'];
  echo " ";
  echo $user['ip'];
  echo '<br>';
}
?>
</body>
</html>



2020 m. gruodžio 16 d., trečiadienis

2020 m. gruodžio 6 d., sekmadienis

Šviesa

  • Apšvietimo lygis. lx
    Renkantis lemputės ryškumą, Jums bus aktualūs liumenai, kuriais matuojamas šviesos srautas: kuo liumenų daugiau, tuo lemputė švies ryškiau.

  • Spalvinė temperatūra, matuojama kelvinais.
     Pagal vietą, kurioje bus naudojamas apšvietimas, rinkitės lemputės spalvinę temperatūrą (ji nurodoma kelvinais). Kuo daugiau kelvinų, tuo balta spalva „šaltesnė“, tiksianti darbingai aplinkai, ir kuo jų mažiau, tuo balta „šiltesnė“, tiksianti miegamajam ar kitoms patalpoms, kuriose intensyvus apšvietimas nebūtinas. 

    • Kuo daugiau kelvinų, tuo šaltėja spalva.
    • Juvelyrika ir sidabras 5000K-6000K kad išryškėtų metališkumas.




  • Šviesos sklidimo kampas
    Jei lemputę naudosite kryptingam apšvietimui, pravartu atkreipti dėmesį į šviesos sklidimo kampą, pavyzdžiui, šviestuvui prie lovos reikalingas siauras kampas, o plataus kampo LED lempa tinkama naudoti bendram patalpos apšvietimui. 
  • Šviesos apsaugos klasė (dulkės vanduo).

Apšvietimas


Lemputės: Spectrum LED
6W veikia kaip 46W.
4K kelvinų, Balta.
Viena pusė, dvi  lempos: 540 lm  * 2 = 1080 lm
Visos lempos:  540 lm * 3 =  1602 lm






Droselis

Droselis naudojamas srovės ribojimui.

Droselis vaidina lemiamą vaidmenį veikiant fluorescencinei lempai, nes sukuria priimtinas sąlygas tokio tipo apšvietimo įtaisui veikti: jis sulaiko didėjančią srovę tam tikru lygiu, o tai leidžia išlaikyti pakankamą įtampą lemputės elektroduose.
  • užtikrinant fluorescencinės lempos, kuriai taip pat reikalingas starteris, veikimą;
  • sugebėjimas apriboti srovę tam tikru lygiu;