Skip to content

Instantly share code, notes, and snippets.

View hafizmdyasir's full-sized avatar

Mohammad Yasir hafizmdyasir

View GitHub Profile
@hafizmdyasir
hafizmdyasir / some_google_doc_shortcuts_to_change_font_highlight.user.js
Created February 21, 2023 06:17 — forked from WiliTest/some_google_doc_shortcuts_to_change_font_highlight.user.js
some google doc shortcuts to change the font and highlights using a Userscript (works with ViolentMonkey)
// Help needed: I failed to send a value to the text resize and to apply it. Any idea ?
// to install this script: install the violentmonkey extension. Then click on "raw" on this github page.
// *perso note:
//to install or to send update:
// 1/ edit must be done on github (cf. the url in the tab settings).
// 2/ Edit/update the script (using the edit github button) + increase the version (or it will ask to reinstall in the next step)
// (don't need to increase the version if the change are just for myself: just reinstall it to keep the version)
// 3/ click on RAW (it will show the changes).
@hafizmdyasir
hafizmdyasir / RecyclerSwipeHelper.java
Last active February 1, 2022 12:39
A simple and lightweight class that helps to enable swiping on RecyclerView Items. It extends SimpleCallBack and can be used to attach a swipe listener to the RecyclerView.
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuffXfermode;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.view.View;
import androidx.annotation.ColorInt;