Skip to content

Instantly share code, notes, and snippets.

View percyvega's full-sized avatar

Percy Vega percyvega

View GitHub Profile

SSL

  1. 1-way SSL (a.k.a. Server Authentication)
    1. Client confirms the server’s identity via the server’s provided certificate by verifying it with a CA (Certificate Authority).
    2. Then the Public Key contained in the received certificate is used along the Session Key to encrypt all sent/received messages.
  2. 2-way SSL (a.k.a. Client Authentication, Mutual Authentication)
    1. Server and Client confirm the other’s identity after each share their own public certificate by verifying it with a CA.
    2. Then the Public Key contained in the received certificate is used along the Session Key to encrypt all sent messages.

Keystore

When one records, it should easily reach -12db, and only as loud as -6db, otherwise it will over-modulate.

For podacasts Convert it to mono and then encode at 64kbps joint stereo MP3 to get the best size / quality / compatibility ratio. Joint stereo would be essentially mono in this case but some old players don't support mono very well.

Cables:

  1. BLACK, RED are hot wires, carrying power from the service panel to the electrical device.
  2. WHITE wires are neutral, meaning they carry power back to the service panel.
  3. GREEN (or bare copper) wires are ground wires.

Ceiling Fan: Connect the tip of the ceiling COPPER wire with the tip of the GREEN ground wires (one from the fan, and another one from the fan base).

Connect all WHITE neutral wires (ceiling, receiver and fan).

CONCEPTS

Take a clone of a remote repository and run git branch -a (to show all the branches git knows about). It will probably look something like this:
	* master
	  remotes/origin/HEAD -> origin/master
	  remotes/origin/master
Here, master is a branch in the local repository. remotes/origin/master is a branch named master on the remote named origin. You can refer to this as either origin/master, as in:
	git diff origin/master..master
You can also refer to it as remotes/origin/master:

git diff remotes/origin/master..master

Vert.x is a toolkit to build reactive and distributed systems.

It's a server API for writing asynchronous networking applications (e.g. for db connectivity, monitoring, authentication, service discovery, clustering, etc.)

You can use Vert.x callback-based API exclusively, but Vert.x also implements an equivalent Rxified API using RxJava under the hood. This provides a great platform to integrate Vert.x modules within RxJava applications.

Vert.x provides fluent HTTP endpoints and route configuration backed by handlers where the business logic is implemented. But the real nervous system is the event bus that acts as a telecom provider to all Vert.x local or distributed components.

Its event-bus supports:

List

List current directory's directories
	ls -ld *
List current directory's directories and their files:
	ls -l *
List current directory's contents recursively:
	ls -lR
List specified directory's contents:

ls dir123 -ltr

Help

$ docker --help
$ docker image --help
$ docker image ls --help

Versions

See the Docker version

$ docker --version

Legend

  • Shift: ⇧
  • Control: ⌃
  • Alt/Option: ⌥
  • Command: ⌘
  • Enter/Return: ⏎
  • Right arrow: →
  • Left arrow: ←
  • Up arrow: ↑
  • Down arrow: ↓
@percyvega
percyvega / RegEx Cheatsheet.md
Last active October 6, 2021 01:53
RegEx Cheatsheet

https://regex101.com/

Remove all Javadocs from a file /*(?s:(?!*/).)**/

    \/ matches the character / literally (case sensitive)
    \* matches the character * literally (case sensitive)
    Non-capturing Group. Matches the tokens contained with the following effective flags: s (?s:(?!\*\/).)*
        s modifier: single line. Dot matches newline characters
  • matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)
@percyvega
percyvega / DDD Cheatsheet.md
Last active September 8, 2022 22:29
DDD Cheatsheet

DDD

Message types:

  1. Command: an expression of intent to trigger an action in the domain.
    • Routing: routed to a single handler (via consistent hashing).
    • Outcome: provides confirmation/result (sync or async).
  2. Event: a notification (if subscribed) that something relevant has happened inside the domain.
    • Routing: distributed to all logical handlers (ordering required).
    • Outcome: no results from handling.
  3. Query: a request for information or state.