Skip to content

Instantly share code, notes, and snippets.

View walee-balogun's full-sized avatar

Adewale Balogun walee-balogun

View GitHub Profile
@walee-balogun
walee-balogun / Data binding example.java
Created October 15, 2018 18:49 — forked from vtthach/Data binding example.java
MVVM LiveData ViewModel Gradle Data Binding
private lateinit var binding: ActivityMainBinding
binding = DataBindingUtil.setContentView(this, R.layout.activity_main)
// Set view model
binding.viewModel = viewModel
// Execute pending binding data
binding.executePendingBindings()
// View model
val viewModel = ViewModelProviders.of(this, viewModelFactory).get(MainViewModel::class.java)
http://cronus.allowed.org works for me, 2018.1.6
@walee-balogun
walee-balogun / latency.txt
Created November 20, 2023 11:57 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@walee-balogun
walee-balogun / README.md
Created March 25, 2024 16:08 — forked from anchan828/README.md
This is an improvement to allow @nestjs/[email protected] to handle CustomRepository. I won't explain it specifically, but it will help in some way. https://github.com/nestjs/typeorm/pull/1233

You need to provide some classes and decorators yourself to maintain the same style as [email protected].

1. EntityRepository -> CustomRepository

@EntityRepository(UserEntity)
export class UserRepository extends Repository<UserEntity> {}

@walee-balogun
walee-balogun / instagram-web-unfollow.js
Created May 14, 2024 20:20 — forked from lifenautjoe/instagram-web-unfollow.js
Script to unfollow people in the instagram website
/**
* Instagram web unfollow script
*
* WHAT IS IT?
* A script to unfollow people in the instagram website
*
* WHY?
* I needed to clean my account so I quickly did this
*
* HOW TO USE:
### This gist is a part of the NestJS Zero to Hero course on Udemy.
### https://www.udemy.com/course/nestjs-zero-to-hero/?referralCode=F672C0C701844DC91F4D
To run PostgreSQL on Docker, run the following in your Terminal:
docker run --name postgres-nest -p 5432:5432 -e POSTGRES_PASSWORD=postgres -d postgres