Skip to content

Instantly share code, notes, and snippets.

There's a workaround that might be useful for some people - use the Shadowsocks app for Android TV. Because that app only accepts a JSON configuration file, you need to convert the Outline key to JSON.

  1. Take the following JSON file template:
    {
        "server":"YOUR-SERVER",
        "server_port":12345,
        "local_port":1080,
        "password":"YOUR-PASSWORD",
        "method":"chacha20-ietf-poly1305",
import android.widget.TextView
/**
* sets an alpha on the lines after the Nth line, this could be useful for when animating a TextView to get smnaller and have less lines
* alpha: the desired alpha
* onLinesAfter: all lines after this line will have the color set on them (1 based index, i.e first line is 1 not 0)
* forceColor: by default will use the color already set on the TextView, but you can over ride the color if needed
* return: the spannable used, in case you need to remove it later
*/
@zach-klippenstein
zach-klippenstein / ChangePassword.java
Last active June 23, 2024 19:01
The keystore password on Java keystore files is utterly pointless. You can reset it without knowing it, as shown by this code. Note that private keys are still secure, as far as I know. The JKS implementation is copyright Casey Marshall (rsdio@metastatic.org), and the original source is available at http://metastatic.org/source/JKS.java. I've in…
import java.util.*;
import java.io.*;
import java.security.*;
public class ChangePassword
{
private final static JKS j = new JKS();
public static void main(String[] args) throws Exception
{