Skip to content

Instantly share code, notes, and snippets.

View polbins's full-sized avatar
🏔️

polbins polbins

🏔️
View GitHub Profile
@polbins
polbins / README.md
Last active September 6, 2019 11:08
Android Response Caching using Retrofit 1.9 + OkHttp 2.2

Android REST Controller with Cache-Control

Android REST Controller with Simple Cache Control Headers using Retrofit 1.9.0 + OkHttp 2.2.0

@polbins
polbins / install_edimax_ew-7611ulb.sh
Created November 15, 2019 03:33
Installing Edimax EW-7611ULB
#!/bin/bash
# https://edimax.freshdesk.com/support/solutions/articles/14000047172-how-to-install-ew-7611ulb-adapter-on-raspberry-pi
git clone https://github.com/lwfinger/rtl8723bu.git
cd rtl8723bu
make
sudo make install
sudo modprobe -v 8723bu
sudo bash -c "echo 8723bu >> /etc/modules"
@polbins
polbins / prepare-commit-msg
Last active December 11, 2019 15:07 — forked from andrei-dragusanu/prepare-commit-msg
prepare-commit-msg that gets JIRA ID from git branch name
#!/bin/sh
# Jira ID Extraction
# =================================
# Extract Jira ID from branch name and prepend to commit message.
#
# Takes a commit message like: "A commit comment" for branch "feature/SUM-1234-hello"
# and changes it to: "SUM-1234: A commit comment" for easier commit updates.
#
# Installation
@polbins
polbins / AccountAuthenticator.java
Created October 28, 2020 01:08 — forked from burgalon/AccountAuthenticator.java
Implementing OAuth2 with AccountManager, Retrofit and Dagger
public class AccountAuthenticator extends AbstractAccountAuthenticator {
private final Context context;
@Inject @ClientId String clientId;
@Inject @ClientSecret String clientSecret;
@Inject ApiService apiService;
public AccountAuthenticator(Context context) {
super(context);
@polbins
polbins / README.md
Last active June 20, 2022 02:50
Android Studio as default Git Diff Tool

Create Android Studio Command-line Launcher

  1. Open Android Studio
  2. Go to: Tools > Create Command-line Launcher
  3. Leave as default, Press OK

Configure Git to use Android Studio as default Diff Tool

  1. Add the following lines to your .gitconfig
@polbins
polbins / Fastfile
Created October 3, 2017 03:25
Fastlane script for Uploading to Slack and Play Store Alpha
default_platform :android
platform :android do
before_all do
ENV["SLACK_URL"] = "https://hooks.slack.com/services/ABC/123/XYZ"
end
######################### PUBLIC LANES #########################
desc "Deploy a new Prod APK version to Play Store Alpha"
@polbins
polbins / README.md
Last active February 29, 2024 09:58
Simple RecyclerView Divider

Simple RecyclerView Divider

Simple Horizontal Divider Item Decoration for RecyclerView

    mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
            getApplicationContext()
    	));

NOTE: Add item decoration prior to setting the adapter