Skip to content

Instantly share code, notes, and snippets.

@sunsheng
sunsheng / adb_usage_notes.md
Created February 5, 2023 09:12 — forked from h1code2/adb_usage_notes.md
Android 系统源码编译 #android #ubuntu #编译 #源码 #8.0.0

adb install -r 替换已存在的应用程序,也就是说强制安装

adb install -l 锁定该应用程序

adb install -t 允许测试包

adb install -s 把应用程序安装到sd卡上

adb install -d 允许进行将见状,也就是安装的比手机上带的版本低

@sunsheng
sunsheng / setup_jdb.md
Created January 9, 2023 09:42 — forked from krazylearner/setup_jdb.md
set up jdb with android

start bluestack or emulator install app on it start the app

connect adb to emulator

$ adb connect localhost:5555

get 'pid' of your app .Dont forget to run it first in emulator

@sunsheng
sunsheng / extract android kernel.md
Created January 6, 2023 08:57 — forked from azureru/extract android kernel.md
How to Extract Android Kernel And Modify The Boot Ramdisk (Android 4.4) on Allwinner based Processor

Extracting Existing Kernel + Ramfs

Enter the machine using adb shell

Run cat /proc/partitions

  #  Path                     Purpose        Size
  0 /dev/block/mmcblk0                       7761920
  1 /dev/block/mmcblk0p1      data           6085631
@sunsheng
sunsheng / README.md
Created August 16, 2022 02:51 — forked from danielepolencic/README.md
Create 3 nodes Kubernetes cluster locally with Vagrant

3 Virtual Machines Kubernetes cluster

Dependencies

You should install VirtualBox and Vagrant before you start.

Creating the cluster

You should create a Vagrantfile in an empty directory with the following content:

@sunsheng
sunsheng / file.txt
Last active February 15, 2022 05:15
key、csr、crt 区别
key通常指私钥
CSR 是Certificate Signing Request的缩写,即证书签名申请,这不是证书,这是要求CA给证书签名的一种正是申请,该申请包含申请证书的实体的公钥及该实体店某些信息。该数据将成为证书的一部分。CSR始终使用它携带的公钥所对应的私钥进行签名。
CRT 即 certificate的缩写,即证书
TLS:传输层安全协议 Transport Layer Security的缩写
SSL:安全套接字层 Secure Socket Layer的缩写
@sunsheng
sunsheng / LVUAAgentInstBaseRoot.md
Last active November 21, 2023 03:05
删除 /opt/LVUAAgentInstBaseRoot
sudo su

杀死进程

ps -ef | grep LVS
kill -9 $PID

删除文件夹

@sunsheng
sunsheng / make_cert.md
Created February 15, 2022 03:52 — forked from liuguangw/make_cert.md
使用openssl制作自定义CA、自签名ssl证书

自签名ssl证书生成

生成CA私钥

# 创建文件夹 ca 保存Ca相关
mkdir ca
cd ca
#创建私钥 (建议设置密码)
openssl genrsa -des3 -out myCA.key 2048
@sunsheng
sunsheng / convert_face_to_coco.py
Created December 14, 2020 05:17 — forked from AruniRC/convert_face_to_coco.py
Get MS-COCO JSON from WIDER annotations
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import h5py
import json
import os
import scipy.misc
@sunsheng
sunsheng / list_targets.sh
Created March 21, 2019 06:20 — forked from pvdb/list_targets.sh
List all targets (sometimes incorrectly referred to as "goals") in a GNU Makefile
#
# this gist can be used to list all targets, or - more correctly - rules,
# that are defined in a Makefile (and possibly other included Makefiles)
# and is inspired by Jack Kelly's reply to a StackOverflow question:
#
# http://stackoverflow.com/questions/3063507/list-goals-targets-in-gnu-make/3632592#3632592
#
# I also found this script - http://www.shelldorado.com/scripts/cmds/targets - which does
# something similar using awk, but it extracts targets from the "static" rules from a single
# Makefile, meaning it ignores any included Makefiles, as well as targets from "dynamic" rules
@sunsheng
sunsheng / pb_viewer.py
Created January 15, 2019 10:20 — forked from jubjamie/pb_viewer.py
Load .pb into Tensorboard
import tensorflow as tf
from tensorflow.python.platform import gfile
with tf.Session() as sess:
model_filename ='PATH_TO_PB.pb'
with gfile.FastGFile(model_filename, 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
g_in = tf.import_graph_def(graph_def)
LOGDIR='/logs/tests/1/'
train_writer = tf.summary.FileWriter(LOGDIR)