Skip to content

Instantly share code, notes, and snippets.

@Nutomic
Nutomic / CustomChooserIntent.java
Last active June 25, 2018 09:42
Create Intent Chooser with Application Whitelist. Based on https://gist.github.com/mediavrog/5625602
package de.videmic.view;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Parcelable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
package com.nutomic.syncthingandroid.preferences;
import android.content.Context;
import android.preference.MultiSelectListPreference;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Lint Report</title>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto" />
<style>
body {
max-width: 800px;
background-color: #000000;
background: -webkit-gradient(linear, left top, right bottom, from(#000000), to(#272d33));
Dec 14 22:29:54 peertube peertube[1484]: [peertube.social:443] 2018-12-14 22:29:54.995 warn: Incorrect request parameters {
Dec 14 22:29:54 peertube peertube[1484]: "meta": {
Dec 14 22:29:54 peertube peertube[1484]: "path": "/api/v1/search/videos?search=",
Dec 14 22:29:54 peertube peertube[1484]: "err": {
Dec 14 22:29:54 peertube peertube[1484]: "search": {
Dec 14 22:29:54 peertube peertube[1484]: "location": "query",
Dec 14 22:29:54 peertube peertube[1484]: "param": "search",
Dec 14 22:29:54 peertube peertube[1484]: "value": "",
Dec 14 22:29:54 peertube peertube[1484]: "msg": "Should have a valid search"
Dec 14 22:29:54 peertube peertube[1484]: }
@Nutomic
Nutomic / lemmy-delete-old-post-thumbnails.bash
Last active March 20, 2024 10:00
lemmy-delete-old-post-thumbnails.bash
# Post thumbnails can take up a lot of space in Lemmy as they dont have a size
# limitation. This script helps with cleanup by reading old thumbnails from
# the db, then deleting them from pictrs.
#
# WARNING: Completely untested, use at your own risk!
#!/bin/bash
set -e