Skip to content

Instantly share code, notes, and snippets.

View addeeandra's full-sized avatar
🐣
Is it egg, chicken, or both?

Aditya Chandra addeeandra

🐣
Is it egg, chicken, or both?
View GitHub Profile
# make sure to run `update` and `upgrade` before proceeding, and if there is kernel update, please reboot before continue
#!/bin/bash
sudo nala install linux-firmware linux-generic ronn build-essential pkg-config
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
mkdir -p ~/downloads
@addeeandra
addeeandra / APIManager.java
Created April 22, 2020 13:36 — forked from sideffect0/APIManager.java
Retrofit Client with Persistent Cookie
class APIManager {
// client with persistent Cookie
public static OkHttpClient getRetrofitClient(final Context context) {
OkHttpClient client = new OkHttpClient();
CookieManager cookieManager = new CookieManager(new PersistentCookieStore(context), CookiePolicy.ACCEPT_ALL);
cookieManager.setCookiePolicy(CookiePolicy.ACCEPT_ALL);
client.setCookieHandler(cookieManager);
return client;
}