Skip to content

Instantly share code, notes, and snippets.

View denilsonpy's full-sized avatar
🌑
Creating something amazing...

Denilson Martins denilsonpy

🌑
Creating something amazing...
View GitHub Profile

For markdown texts, we need to specify the languages for corresponding syntax highlighting.

Following is an example for highlighting c++ codes in markdown texts.

bool getBit(int num, int i) {
	return ((num & (1<<i)) != 0);
}
@denilsonpy
denilsonpy / tmux-cheatsheet.markdown
Created October 22, 2022 18:40 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@denilsonpy
denilsonpy / active_record_vs_data_mapper.md
Last active October 19, 2022 15:57
Active Record vs Data Mapper

Active Record vs Data Mapper

Both patterns solve the problem of connecting applications with data storage, the both follow different philosophies.

Active Record

We define all the query methods for acessing the data within the model class itself (create, update, delete...).

@denilsonpy
denilsonpy / clean_code.md
Created October 13, 2022 11:15 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example