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
- 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
- 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.
Single sign-on (SSO),
Documentation:
Controller:
CRSF
Set-Cookie XSRF-TOKEN=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie XSRF-TOKEN=947b8dc9-5781-40a8-b349-64c0750b0f94; Path=/
Basic Auth
Form Based Auth
OAuth 2
- 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.
- client_credentials
Token implementations
- 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.
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
2020 m. gruodžio 18 d., penktadienis
git branch
$ git branch -f bugFix <commit hash>
$ git push origin --delete gh-pages
Change master to commit
$ git reset <commit hash>
Move head up 2 commits
$ git checkout HEAD~2
