Skip to content

Instantly share code, notes, and snippets.

View RahulSDeshpande's full-sized avatar
☑️
Code • Jam • Shoot | Repeat

Rahul RahulSDeshpande

☑️
Code • Jam • Shoot | Repeat
View GitHub Profile

Keybase proof

I hereby claim:

  • I am RahulSDeshpande on github.
  • I am rhld (https://keybase.io/rhld) on keybase.
  • I have a public key whose fingerprint is E635 1D59 19C1 7641 7A47 CE8C 9DA8 4D29 D71E 0F45

To claim this, I am signing this object:

@RahulSDeshpande
RahulSDeshpande / mysql-calculate-db-sizes.sql
Created July 19, 2021 22:08
MySQL query to calculate sizes of all the DBs
SELECT table_schema AS "Database",
ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size (MB)"
FROM information_schema.TABLES
GROUP BY table_schema;
@RahulSDeshpande
RahulSDeshpande / Network.java
Created January 4, 2023 08:43 — forked from nishantkp/Network.java
Find out application is connected to WIFI or cellular
/**
* Get reference to the connectivity manager
*/
ConnectivityManager connectivityManager =
(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
/**
* Find out whether device is connected to wifi or cellular at the moment
*/
public NetworkType getNetworkType() {