- Install SSHelper or 08.30.2018 Version 11.9
- mount Android device via sshfs
$ printf "admin\n" | sshfs [email protected]:/ ~/mnt -o port=2222,password_stdin
- use rsync to backup all files
$ rsync -avH --progress ~/mnt/storage/extSdCard/DCIM .
- passwordless login
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
property btnTitle : "Mute audio" | |
if application "zoom.us" is running then | |
tell application "System Events" | |
tell application process "zoom.us" | |
if exists (menu item btnTitle of menu 1 of menu bar item "Meeting" of menu bar 1) then | |
set returnValue to "Unmuted" | |
else | |
set returnValue to "Muted" | |
end if |
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
package com.squareup.leakcanary | |
import android.app.Application | |
import com.bugsnag.android.Client | |
import com.bugsnag.android.MetaData | |
import com.bugsnag.android.Severity.ERROR | |
import com.squareup.leakcanary.BugsnagLeakUploader.ReportType.FAILURE | |
import com.squareup.leakcanary.BugsnagLeakUploader.ReportType.LEAK | |
import com.squareup.leakcanary.BugsnagLeakUploader.ReportType.NOT_FOUND | |
import com.squareup.leakcanary.BugsnagLeakUploader.ReportType.WONT_FIX_LEAK |
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.content.Context | |
import android.graphics.Canvas | |
import android.graphics.Color | |
import android.graphics.Paint | |
import android.util.AttributeSet | |
import android.view.View | |
import kotlin.math.cos | |
import kotlin.math.sin | |
import kotlin.math.sqrt |
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 'dart:math' show pi; | |
import 'package:flutter/material.dart'; | |
/// A Widget that can be configured to show funky spinning rectangles! | |
/// | |
/// ### Usage | |
/// | |
/// ``` | |
/// Spinnies( |
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
#!/usr/bin/env bash | |
# I've found that the "Migrate to AndroidX" converter in Android Studio doesn't work very | |
# well, so I wrote my own script to do the simple job of converting package names. | |
# | |
# You can download a CSV of package names here: https://developer.android.com/topic/libraries/support-library/downloads/androidx-class-mapping.csv | |
# | |
# It'll run faster on a clean build because then there are fewer files to scan over. | |
# | |
# Uses `gsed` because I'm on a Mac. Can easily replace with `sed` if you don't have `gsed`. |
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
output = oceanlife-activity-fragment.graphml | |
classpath = ../../../OceanLife/app/build/intermediates/classes/withAmazon/debug/com/brantapps/oceanlife/ | |
# Don’t model dependencies | |
exclude = java*.** | |
exclude = android*.** | |
exclude = dagger*.** | |
exclude = rx*.** | |
exclude = okhttp*.** | |
exclude = org*.** |
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
#!/usr/bin/swift | |
// Run: $ swift noCrashplan.swift | |
// Background: https://github.com/KrauseFx/overkill/issues/3#issuecomment-270505227 | |
import Foundation | |
import Cocoa | |
import ServiceManagement | |
let badApps = [ "Code42 CrashPlan", "CrashPlanService", "CrashPlanLauncher", "CrashPlanWeb" ] |
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
final PublishRelay<String> refreshRelay = PublishRelay.create() | |
void refreshData() { | |
refreshRelay.call("refresh event") | |
} | |
Observable<Lce<Data>> getDataEventStream() { | |
return refreshRelay | |
.startWith("initial") | |
.switchMap { event -> |
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
public void onAttach(View view) { | |
// Remember to clean the subscription! | |
repository.getDataEventStream().subscribe({ event -> | |
if (event.isLoading) { | |
view.showLoading(true) | |
} else if (event.hasError()) { | |
view.showError(event.getError()) | |
} else { | |
view.showData(event.getData()) | |
} |