Skip to content

Instantly share code, notes, and snippets.

View danilodequeiroz's full-sized avatar
🍅
piccolo pomodoro

Danilo de Queiroz danilodequeiroz

🍅
piccolo pomodoro
View GitHub Profile
@AVINASH21AK
AVINASH21AK / Custom font in WebView
Created January 2, 2018 06:15 — forked from andrea-ale-sbarra/Custom font in WebView
How to add custom font in Android WebView.
//View container..
View rootView = inflater.inflate(R.layout.fragment1, container, false);
//Global WebView
mWebView = (WebView) rootView.findViewById(R.id.enter_text);
//Font must be placed in assets/fonts folder
String text = "<html><style type='text/css'>@font-face { font-family: spqr; src: url('fonts/spqr.ttf'); } body p {font-family: spqr;}</style>"
+ "<body >" + "<p align=\"justify\" style=\"font-size: 22px; font-family: spqr;\">" + getString(R.string.enter_text) + "</p> "+ "</body></html>";
@DrewML
DrewML / Theming-Slack-OSX.md
Last active January 25, 2022 00:53
Theming Slack for OSX

Theming Slack for OSX

So, you love Slack, but you hate applications with large white backgrounds? Why not use Dark Mode!

Unfortunately, Slack does not have a Dark Mode, although it's on their list of possibilities.

But, don't fret - there is a solution! Because the slack native desktop apps are just wrappers around a web app, we can inject our own CSS to customize the application to our liking.

How to (OSX Only)

@r-martins
r-martins / ubuntu.txt
Created October 3, 2012 22:33
Resolvendo problema de Ç (cedilha) No Ubuntu
Alguns programas (que usam GTK) no Ubuntu nao funcionam a Ç cedilha com ' + c.
Pra resolver:
Problem with cedilla:
After many versions of Ubuntu assigning accented c (“ć”) instead of c with a cedilla (“ç”) when typing ‘ + c in deadkeys keyboard layouts, since Ubuntu 11.10 GTK changed the default in an U.S. English locale back to the cedilla. However, non-GTK applications (e.g., Skype) still have the old behavior. To fix them, edit as root the file /usr/share/X11/locale/en_US.UTF-8/Compose and change all instances of ć with ç, and all instances of Ć with Ç.
You might need to repeat this operation from time to time, when you upgrade your system and it takes the configuration files back to their original contents.
public class ResourceProvider {
private final Context context;
@Inject
public ResourceProvider(Context context) {
this.context = context;
}
@NonNull