Skip to content

Instantly share code, notes, and snippets.

@frmz
frmz / featured.json
Created March 1, 2024 14:11
featured.json
{
"widget": {
"debug": "on",
"window": {
"title": "Sample Konfabulator Widget",
"name": "main_window",
"width": 500,
"height": 500
},
"image": {
@frmz
frmz / Kustom5SecsDelayProvider.java
Last active April 18, 2024 02:54
Example content provider to fix on launcher side the "5 secs delay" security restriction Android has on the Home Button
import android.content.ContentProvider;
public class Kustom5SecsProvider extends ContentProvider {
/**
* Path used by Kustom to ask a 5 secs delay reset
*/
private final static String PATH_RESET_5SEC_DELAY = "reset5secs";
@Override
@frmz
frmz / gist:0eeac13051e050ce0982
Last active August 29, 2015 14:16
Time to text
public class TimeToText {
private final static String sTimeWords[] = {"", "One", "Two", "Three", "Four", "Five", "Six",
"Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen",
"Sixteen", "Seventeen", "Eighteen", "Nineteen", "Twenty", "Twenty one", "Twenty two",
"Twenty three", "Twenty four", "Twenty five", "Twenty six", "Twenty seven",
"Twenty eight", "Twenty nine"};
public static String timeToTextEnglish(int h, int m) {
if (m == 0) return sTimeWords[h] + " o'clock";