Skip to content

Instantly share code, notes, and snippets.

@jiggie42
jiggie42 / gist:f99d99a3264d01e19890ab49d27b9894
Created July 12, 2020 06:08
weechat-android SOLVED issues to close
7-12
I believe these lot are good to close at this point, for a variety of reasons
https://github.com/ubergeek42/weechat-android/issues/378
No steps to reproduce, ancient
https://github.com/ubergeek42/weechat-android/issues/57
ancient, issue long resolved
https://github.com/ubergeek42/weechat-android/issues/59
old issue, long resolved
https://github.com/ubergeek42/weechat-android/issues/67
@Den-Rimus
Den-Rimus / ResettableLazyDelegate.kt
Last active June 22, 2022 04:39
Android Kotlin resettable lazy delegate
interface ResettableLazy<out T> : Lazy<T> {
fun reset()
}
private class ResettableSynchronizedLazyImpl<out T>(initializer: () -> T, lock: Any? = null) : ResettableLazy<T> {
private val initializer: (() -> T)? = initializer
@saurabhkpatel
saurabhkpatel / printActivityFlags.java
Last active May 6, 2024 10:43
[Android] : Print Activity Flags, it will be useful for the debug.
public static void printActivityFlags(String activityName, Intent intent) {
Field[] declaredFields = Intent.class.getDeclaredFields();
StringBuilder stringBuilder = new StringBuilder(activityName + " => ");
for (Field field : declaredFields) {
if (field.getName().startsWith("FLAG_")) { // Fetch all the flag names which start from "FLAG_"
try {
int flag = field.getInt(null);
if ((intent.getFlags() | flag) == intent.getFlags()) { // checking that flag is present or not.
stringBuilder.append(field.getName());
stringBuilder.append("|");
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@anekos
anekos / mapping-z.js
Created September 13, 2013 23:58
Mapping to z
js [it.names = [] for (it of mappings.getCandidates(modes.NORMAL, 'z'))]
nnoremap z something