Skip to content

Instantly share code, notes, and snippets.

View NunciosChums's full-sized avatar

NunciosChums NunciosChums

  • Seoul, Korea
  • 09:56 (UTC +09:00)
View GitHub Profile
@lucanicoletti
lucanicoletti / EndlessRecyclerViewScrollListener.kt
Created October 17, 2018 10:35
EndlessRecyclerViewScrollListener file for kotlin projects
/**
* Created by Luca Nicoletti
* © 17/10/2018
* Copied from: https://gist.github.com/nesquena/d09dc68ff07e845cc622; added some little edits for Kotlin
*/
abstract class EndlessRecyclerViewScrollListener(private var visibleThreshold: Int = 5): RecyclerView.OnScrollListener() {
private var currentPage = 0
private var previousTotalItemCount = 0
private var loading = true
@jtallant
jtallant / setting-up-sinatra-with-active-record.md
Last active March 25, 2024 13:26
Setting up Sinatra with Active Record

Setting up Sinatra Project

create an empty project and add a Gemfile

cd ~/Desktop
mkdir project-name
cd project-name
touch Gemfile
@zapidan
zapidan / git-change-author
Last active June 19, 2023 13:21
Change previous commits author/email with filter-branch
## Make sure your local repo settings are correct
git config --local --list
git config --local user.name "author name"
git config --local user.email "name@example.com"
## Change previous n commits
git rebase -i HEAD~n
# choose the commits to change by adding 'pick' or 'reword' (only for changing the message)
git commit --amend --author="Author Name <email@address.com>"
# change first commit in repo
@ianbarber
ianbarber / RetrieveAccessTokenActivity.java
Created March 17, 2014 20:22
A quick example of retrieving an access token with GoogleAuthUtil
package com.google.devrel.samples.gmstest.app;
import android.app.Activity;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;