Skip to content

Instantly share code, notes, and snippets.

View segunfamisa's full-sized avatar
💻
Segun is typing...

Segun Famisa segunfamisa

💻
Segun is typing...
View GitHub Profile
@ErikHellman
ErikHellman / MarkdownComposer.kt
Last active November 22, 2023 12:16
A simple rendered for Markdown text parsed using CommonMarks
package se.hellsoft.markdowncomposer
import android.util.Log
import androidx.compose.foundation.Box
import androidx.compose.foundation.ContentGravity
import androidx.compose.foundation.Text
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.text.InlineTextContent
import androidx.compose.foundation.text.appendInlineContent
import androidx.compose.material.Colors
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21.
To use the support version of these attributes, remove the android namespace.
For instance, "android:colorControlNormal" becomes "colorControlNormal".
These attributes will be propagated to their corresponding attributes within the android namespace
for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
@quinncomendant
quinncomendant / umbrella
Last active May 13, 2022 06:52
[WARNING: this script no longer works with newer versions of the roaming client software, which now has a *Disable* control in its menu so use that instead.] Cisco Umbrella Roaming Client management script for Mac OS X. This makes it easy to manage the background processes of umbrella to start, stop, restart, sleep and get status.
#!/bin/bash
# Quinn Comendant <quinn@strangecode.com>
# https://gist.github.com/quinncomendant/3be731567e529415d5ee
# Since 25 Jan 2015
# Version 1.2.2
# q 13942 0.0 0.3 4408332 22096 ?? SN 7:32PM 0:00.27 /Applications/OpenDNS Roaming Client/RoamingClientMenubar.app/Contents/MacOS/RoamingClientMenubar
# nobody 13937 0.0 0.1 4296740 5164 ?? Ss 7:31PM 0:00.06 /usr/local/sbin/dnscrypt-proxy --user nobody --local-address=127.0.0.1:53 --plugin=libdcplugin_erc.so -d
# root 13903 0.0 0.2 4366308 13752 ?? SNs 7:31PM 0:00.25 /Library/Application Support/OpenDNS Roaming Client/dns-updater
@steveliles
steveliles / Foreground.java
Last active January 22, 2024 18:06
Class for detecting and eventing whether an Android app is currently foreground or background (requires API level 14+)
package com.sjl.util;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import java.util.List;
@granoeste
granoeste / EachDirectoryPath.md
Last active April 4, 2024 22:32
[Android] How to get the each directory path.

System directories

Method Result
Environment.getDataDirectory() /data
Environment.getDownloadCacheDirectory() /cache
Environment.getRootDirectory() /system

External storage directories