This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Extract consumer ProGuard rules from all dependencies and generate an HTML report | |
# Author: Jan Rabe | |
set -e | |
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
cd "$SCRIPT_DIR" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo killall mds && sudo mdutil -i on && sudo mdutil -E |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shutil | |
import argparse | |
def get_dir_size(dir_path): | |
"""Calculate the total size of a directory in bytes.""" | |
total_size = 0 | |
for dirpath, dirnames, filenames in os.walk(dir_path): | |
for filename in filenames: | |
file_path = os.path.join(dirpath, filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.R | |
import android.app.Activity | |
import android.graphics.Rect | |
import android.view.View | |
import android.view.ViewTreeObserver | |
import android.widget.FrameLayout | |
class AndroidBug5497Workaround private constructor(activity: Activity) { | |
private val mChildOfContent: View |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ThreadsWatchDogInitializer: Initializer<Unit> { | |
@Inject lateinit var threads : ThreadsRepository | |
override fun create(context: Context) { | |
C24CoreApplication.inject(this) | |
threads.start() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App : Application() { | |
var strictMode: CoreStrictMode? = null | |
val applicationScope: CoroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Default) | |
} | |
class StrictModeInitializer : Initializer<Unit> { | |
private val corePreferences: CoreSharedPreferencesRepository | |
get() = CoreServices.services.sharedPreferencesRepository | |
override fun create(context: Context) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ViewPostIme pointer 0 | |
ViewPostIme pointer 1 | |
Thread[AppUpdateService,5,main] | |
Thread[CameraAvailabilityObserver_ObservationThread,5,main] | |
Thread[Chrome_IOThread,7,main] | |
Thread[Chrome_ProcessLauncherThread,5,main] | |
Thread[CleanupReference,5,main] | |
Thread[ConnectivityThread,5,main] | |
Thread[CookieMonsterCl,5,main] | |
Thread[DefaultDispatcher-worker-1,5,main] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def joke = new groovy.json.JsonSlurper().parseText(new URL("https://icanhazdadjoke.com/slack").text).attachments.text.join('') | |
def slackResponse = slackSend( | |
channel: "slack-tests", | |
color: "danger", | |
message: "$joke" | |
) | |
slackResponse.addReaction("thumbsup") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* <pre> | |
* def messages = [ | |
* [role: "system", content: "You're a helpful assistant talking like a cat"], | |
* [role: "user", content: "tell me another joke"] | |
* ] | |
* | |
* def response = functions.ollamaChat(messages) | |
* echo "${response.message.content}" | |
* </pre> |
NewerOlder