Skip to content

Instantly share code, notes, and snippets.

@fujingjunben
fujingjunben / instructions.md
Created November 29, 2024 15:32 — forked from matthewjberger/instructions.md
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

Now, we need to sign the unsigned APK and run an alignment utility on it to optimize it and prepare it for the app store. If you already have a signing key, skip these steps and use that one instead.

Let’s create keystore file using this command Syntax:

keytool -genkey -v -keystore .keystore -alias -keyalg -keysize -validity

For Example :

import 'package:flutter/widgets.dart';
import 'package:flutter/material.dart';
import 'dart:convert';
/*
* TextView with HTML tags support By Kyle Katarn for Dart
*
* Original code by Erik Arvidsson, Mozilla Public License
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
* and ported it on JavaScript by John Resig (ejohn.org)
import React, { Component } from 'react';
import {
StyleSheet,
View,
Modal,
ActivityIndicator
} from 'react-native';
const Loader = props => {
const {
@fujingjunben
fujingjunben / BaseThreading
Created March 2, 2018 02:18 — forked from amirasaran/BaseThreading
Python threading with callback function (callback function run after thread is finished)
import time
import threading
class BaseThread(threading.Thread):
def __init__(self, callback=None, callback_args=None, *args, **kwargs):
target = kwargs.pop('target')
super(BaseThread, self).__init__(target=self.target_with_callback, *args, **kwargs)
self.callback = callback
self.method = target
fileTree(dir: 'libs', include: '**/*.aar')
        .each { File file ->
    dependencies.add("compile", [
            name: file.name.lastIndexOf('.').with { it != -1 ? file.name[0..<it] : file.name },
            ext: 'aar'
    ])
}
@fujingjunben
fujingjunben / autopacking.md
Last active August 16, 2017 02:02
出包遇到的问题

关于multidex

如果minSdkVersion设置为21,则打出的包会有很多dex文件,改成15就好了。

打包遇到文件名或扩展名太长

In the meantime, the easy fix is drag assets,lib out and drag them back in with 7zip

iBotPeaches/Apktool#1335

@fujingjunben
fujingjunben / unity_faq.md
Last active July 6, 2017 01:38
Unity相关问题汇总

Unity 打包平时遇到的问题

动态权限

解决用Unity导出的Android工程在6.0及以上设备启动的时候会弹出一串权限对话框的问题

<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true" />
@fujingjunben
fujingjunben / 0_reuse_code.js
Created June 14, 2017 11:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
findViewHolderForAdapterPosition 有时候会返回null,如果要获取的项不在当前页面可见区域的时候,会返回null