Skip to content

Instantly share code, notes, and snippets.

View 已经支持的打开机型号.md

已经支持的打印机型号:
Canon iP2780
Canon iP100
Canon iP110

Hp Deskjet 1000
Hp LaserJet Pro P1106
Hp LaserJet 1020
Hp LaserJet Pro 403d
Hp OfficeJet 200

View 阿里云函数计算踩坑记录.md

函数计算,以下简称fc。是阿里推出的一种新的开发云服务的方式,相比ECS方式能达到像官网上吹的那样可以Serverless,但是这其中也有很多坑。由于笔者采用的nodejs开发,以下就以nodejs为例。

轻量级

直接在fc控制台就可以开始一个helloword,不需要任何本地工程,也不需要了解fun nas vpc 自定义域名 https等等这些名词。这个我这里就不多介绍了,我说说这种方式的弊端:

1. 有容量限制,如果代码和依赖的大小大于50M就需要提工单申请,目前最大也只能申请100M。而你稍微添加个依赖就有可能大于100M。
2. 如果你要上传文件,fc是有6M的最大要求的,如果文件大于6M是不支持的;

:但是也需要了解一大票名词"服务 函数 触发器 版本 别名"等等。它们之间的关系我是理解透了,但是我画不出来它们的关系图给大家看,推荐先玩「轻量级」的,把这些词和关系理解清楚。

View TTDeDroid.patch
diff --git a/libs/jadx/bin/jadx-gui b/libs/jadx/bin/jadx-gui
index 131a97e..c86b948 100755
--- a/libs/jadx/bin/jadx-gui
+++ b/libs/jadx/bin/jadx-gui
@@ -28,7 +28,7 @@ APP_NAME="jadx-gui"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and JADX_GUI_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xms128M" "-Xmx4g" "-Dawt.useSystemAAFontSettings=lcd" "-Dswing.aatext=true" "-XX:+UseG1GC"'
+DEFAULT_JVM_OPTS='"-Xms128M" "-Xmx8g" "-Dawt.useSystemAAFontSettings=lcd" "-Dswing.aatext=true" "-XX:+UseG1GC"'
View kernel_log.txt
<6>[ 0.000000] Initializing cgroup subsys cpu
<5>[ 0.000000] Linux version 3.0.36+ (ybk@v-stone-hwubuntu) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #149 SMP PREEMPT Wed May 6 10:24:20 CST 2015
<4>[ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
<4>[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
<4>[ 0.000000] Machine: RK30board
<6>[ 0.000000] memory reserve: Memory(base:0x91800000 size:80M) reserved for <ion>
<6>[ 0.000000] memory reserve: Memory(base:0x90b00000 size:13M) reserved for <fb0 buf>
<6>[ 0.000000] memory reserve: Memory(base:0x90500000 size:6M) reserved for <camera_ipp_mem>
<6>[ 0.000000] memory reserve: Total reserved 99M
<4>[ 0.000000] Memory policy: ECC disabled, Data cache writeback
View uinput.c
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/input.h>
#include <linux/uinput.h>
#include <stdio.h>
#include <sys/time.h>
View block.md

编译RK3288内核,使用arm-linux-gnueabihf出现的问题。

  OBJCOPY pie/libpie_stage2.o
  LD      pie/pie_stage2.o
arm-linux-gnueabihf-ld: BFD (GNU Binutils for Ubuntu) 2.22 internal error, aborting at ../../bfd/elflink.c line 8758 in elf_link_output_extsym

arm-linux-gnueabihf-ld: Please report this bug.

解决方法是不再使用apt-get install安装的而使用Android源码中的prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-就没有问题了。

View 4.0_ASOC.md

##porting rk616 Audio codec driver from 3.0 version kernel to 4.0 version kernel:

  • error: 'snd_soc_info_volsw_2r' undeclared here (not in a function)
  • error: 'struct snd_soc_codec' has no member named 'mutex'
  • error: 'struct snd_soc_dapm_widget' has no member named 'codec'
  • error: 'struct snd_soc_codec' has no member named 'hw_read'
  • error: 'struct snd_soc_codec' has no member named 'read'
  • error: 'struct snd_soc_codec' has no member named 'write'
@kangear
kangear / rk_dummy.c
Last active Nov 13, 2018
借此Machine驱动了解了ALSA on Soc的Machine驱动。这是一个简单版本的。
View rk_dummy.c
/*
* rk_dummy.c -- SoC audio for rockchip
*
* Driver for rockchip dummy audio
* based: 7aca69f9fe8f04ca37a01e2540960c53b24e3223 patch
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
View rk3188_mainline.md

Linux mainline for rk3188

RK's Loader + Linux(latest) + miniroot(ext4).

###Get the source code

git clone -b stable --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
cd linux-next

wget https://raw.githubusercontent.com/naobsd/linux/naobsd/next-20150306/arch/arm/configs/rk30_rk31_defconfig -O arch/arm/configs/rockchip_defconfig
View list.h
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
#include <stdio.h>
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
/**
* container_of - cast a member of a structure out to the containing structure
* @ptr: the pointer to the member.
You can’t perform that action at this time.