Skip to content

Instantly share code, notes, and snippets.

@zi6xuan
zi6xuan / Activity.java
Created September 11, 2019 06:46
Fix the VideoView memory leak
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(new ContextWrapper(newBase){
@Override
public Object getSystemService(String name) {
if(Context.AUDIO_SERVICE.equals(name)){
return getApplicationContext().getSystemService(name);
}
return super.getSystemService(name);
}
@zi6xuan
zi6xuan / findMatchingSimulator.js
Created October 14, 2019 16:27
findMatchingSimulator.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
module.exports = {
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"prettier",
"prettier/react"
],
"plugins": [
"react",
@zi6xuan
zi6xuan / FreshTomatoSmba.md
Last active July 2, 2023 23:30
FreshTomato set Smba on the wan
  1. Set the smba custom config
 interfaces = br0
 bind interfaces only = yes
  1. Restart the smba
killall smbd
sleep 5