2021 m. lapkričio 25 d., ketvirtadienis

Naudingos svetainės

 Automašikas background pašalinimas:

https://cleanup.pictures/

 

AI teksto vertimas:

https://www.deepl.com/translator 

 

Svetainių šablonai - Templates s: 

https://github.toidicode.com/

2021 m. spalio 26 d., antradienis

Neteisingai rodė laiką sysloge ir spausdinant date

$ set-timezone Europe/Vilnius
$ sudo service rsyslog restart

2021 m. spalio 25 d., pirmadienis

Crypto tools websites

 Contract ABI formatter - https://abi.hashex.org


PankakeSwap testnet - https://pancake.kiemtienonline360.com/#/swap

BSC block explorer  testnet- https://testnet.bscscan.com/

2021 m. spalio 18 d., pirmadienis

Crypto Websites


https://blockfi.com/ - crypto investavimas už procentus

eth:
https://ethgasstation.info/ - Eth gas station.

Stebėjimas ETH:
https://bloxy.info/ - Detali analizė


Stebėjimas BSC/etc:


Porfolio:

Apsisaugojimas:


Blokų grandinių tiltai i(chain-swap):
https://jelly.market/ - daugybė įvairių grandinių

Binance-chain:
Kaip prijungti binance-smart-chain prie Metamask
https://www.xdaichain.com/for-users/bridges/binance-smart-chain-omnibridge/dai-token-on-xdai-bsc

RugChecker Tools:

http://bscheck.eu/
http://rugscreen.com/
https://poocoin.app/rugcheck/
https://tokensniffer.com
http://rugpulldetector.com/
https://rugdoc.io/honeypot/
https://honeypot.is/
https://presaleantirug.com
https://pogged.finance
https://apps.justbuyitffs.com/
https://rugradar.dev/
https://safesolidity.com/validate


Mokymasis:
https://academy.binance.com/en - binance akademija, tvarkinga svetainė sus paprastai paaiškinimais.
https://project-awesome.org/ttumiel/Awesome-Ethereum
 
Privatumas:

Pramogos - nuorodos

Filmai:

https://lookmovie.ag/ Filmai anglų kalba.

https://rezka.ag - Filmai Rusų kalba.

htp://amf.lt/ - Lietuviški Anime online.
 

E-knygos:

http://libgen.li/


Audio-knygos:

https://bigaudiobooks.net


Torentų paieška:


Žaidimai:

https://www.reddit.com/r/Freegamestuff/ - Nemokami žaidimai.



2021 m. balandžio 16 d., penktadienis

Design

 https://html5up.net/ - HTML 5 svetainių dizainas

2021 m. kovo 10 d., trečiadienis

How to change Intelij Terminal

Shell path for wsdl


WSDL: 

"C:\Windows\System32\wsl.exe"      

mingw-64:

"C:\Program Files\Git\bin\bash.exe" -  





How to change npm version

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash

Usage:

$ nvm install <version>       Download and install a <version>

$ nvm use <version>           Modify PATH to use <version>

$ nvm ls                      List versions (installed versions are blue)

Usage:

$ nvm install 12

$ nvm use 12

2021 m. vasario 17 d., trečiadienis

2021 m. vasario 6 d., šeštadienis

Watch bot telegram commands with chartex.pro

Create a Price Alert: /alert price SYMBOL above/below PRICE usd/eth

/alert price WBTC above 15000 usd
/alert price WBTC below 30 eth

To get correct symbol:

/search SYMBOL

/SEARCH CARROT

CARROT.41c38b

Creating alerts

/alert price CARROT.41c38b below 1 usd

/alert price CARROT.41c38b above 10$ usd


2021 m. sausio 17 d., sekmadienis

Ubuntu 20.04 on Hyper-V with enhanced session

Problem

When connecting to Xorg login only black screen black is seen.  

Solution:

Disable automatic logon


Problem

Hyper-v enhanced session ubuntu cant turn on, button is disabled.

Solution: 

$ sudo apt install linux-azure -y

2021 m. sausio 8 d., penktadienis

2021 m. sausio 3 d., sekmadienis

Computer Mouse

Here’s a mind-blowing fact: both optical mice and laser mice are basically just video cameras. Each mouse is equipped with a CMOS sensor. A CMOS sensor detects light. It’s the same kind of technology that’s used in digital cameras.

Similarities in what both optical and laser mice do:
  • They record a flurry of images, sometimes as many as 1,000 per second.
  • The mouse examines one image at a time, trying to detect surface features like textures or scratches.
  • The mouse compares back-to-back images, analyzing whether or not those features have changed position.

Mouse types 



Movement detection technology
  • Optical  
    • + More acurate
    •  + don’t work well on highly reflective surfaces
  • Laser 
    • + More sensitive (picks up more details), works more surfaces, good if you move around
    • -  Jitter

Laser-based mice offer high sensitivity, but they tend to cause jittering. 

It is called a vertical-cavity surface-emitting laser diode (or VCSEL) which is used in laser pointers, optical drives, barcode readers, and more.

Optical mice use LED technology with lower sensitivity, allowing for more accurate movement.

Invisible infrared or red LED that projects light onto a surface.

More:

What does a computer mouse see?



2021 m. sausio 2 d., šeštadienis

Spring security and Oauth

Definitions

  • Authentication  
    • Who are you? 
    • Confirming who they say they are (identity is valid) by e.g password
  • Authorization or "access control" 
    • Authorization is the act of granting an authenticated party permission to do something.
    • What are you allowed to do? 
    • What resources the employee would have access to?
    • Authorities / permissions.
    • Rights and privileges of a user.


For example, think of a traveller checking into a hotel. When they register at the front desk, they are asked to provide a passport to verify that they are the person whose name is on the reservation. This is an example of authentication.

Once the hotel employee has authenticated the guest, the guest receives a keycard with limited privileges. This is an example of authorization. The guest’s keycard grants them access to their room, the guest elevator, and the pool — but not other guests’ rooms or the service elevator. Hotel employees, on the other hand, are authorized to access more areas of the hotel than guests are.


Authentication verifies a user’s identity
Authorization validates if the user has access to perform a specific function.

One-time passcodes (OTP) via SMS
Single sign-on (SSO),
Multi-factor authentication (MFA)



Documentation:







Custom filter:



Controller:


@RestController = @Controller + @Responsebody

@Controller - when annotated, loads pages from static/ folder.
public String admin() {        return "admin.html";    }

@Responsebody - added to display "admin.html" as string.

CRSF


Use CSRF protection for any request, that can be processed by browser by normal users.

CSRF Response header from server



.csfr.disable()
.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())



Basic Auth

Cannot logout.

.httpBasic();

Connection passing username/password each time.

Form Based Auth

Can logout. 
Customising form.
Username and Passwork

.formLogin();

Connection with Session ID in cookies(JSESSIONID).

References: AmigoCode 


OAuth 2


OAuth 2 and Spring Security
A -Authorization server. Provides tokens.
R- Resource server. Uses token.


A - Authorization server 

Provides token.

Grands type:
  • password: knows client and Authorization server


  • authorized_code: knows only Authorization server. Redirects to Authorization server to login, and Authorization serve redirects back to Client.
     
  • Implicit grand type - less secured, DEPRECATED. 1 step less.

    .
  • client_credentials



Blackbording




Resourse and Authorization server writing on same blackboard (database)

Token implementations

How Resource server knows, access token is correct token?
  • opaque
    • If you read it it's just a string, no information encoded in string,
    • Finding more info by checking in /oauth/checktoken endpoint
  • JWT
    • Information is encoded in token.


SSO







Authorization configuration for endpoints

http.authorizeRequests()

.anyRequest() # Aplied rules to all requests.

.hasAuthority("admin")

.hasAnyAuthority("admin", "manager")


.anyRequest().hasRole("USER") #badge - group of actions searches for ("ROLE_USER") by default


Role and Authority

hasAuthority - Action (WRITE, READ)

hasRole - Badge (ROLE_ADMIN)


ENDPOINT = PATH + HTTP Method

/article + GET
/test + POST


Resources:

https://oidcdebugger.com/ - openID debugger


https://jwt.io/ - jwt token decoder