Skip to content

Instantly share code, notes, and snippets.

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

轻量级

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

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

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

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

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

#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>
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"'
@kangear
kangear / rk_dummy.c
Last active November 13, 2018 11:06
借此Machine驱动了解了ALSA on Soc的Machine驱动。这是一个简单版本的。
/*
* 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.

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
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
index 060db6a..65fdde2 100644
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -32,7 +32,7 @@ endif
# CC = gcc
#
-COPTS = -O2 -pipe -Wall -g
+COPTS = -static -O2 -pipe -Wall -g
@kangear
kangear / freg-register_chrdev_region.c
Last active December 27, 2015 03:49
is simple DON'T edit.
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/cdev.h>
#include <asm/uaccess.h>
static struct cdev freg_cdev; //An instance of a character device
static dev_t ndev; //The node of the device
/* "freg"设备的全局变量 */
@kangear
kangear / freg-alloc_chrdev_region.c
Last active December 27, 2015 02:09
That's OK, don't edit.
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/cdev.h>
#include <asm/uaccess.h>
static struct cdev freg_cdev; //An instance of a character device
static dev_t ndev; //The node of the device
/* "freg"设备的全局变量 */
@kangear
kangear / freg-register_chrdev.c
Last active December 27, 2015 02:09
freg.c sample DON'T EDIT.
#include <linux/module.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <asm/uaccess.h>
/* 主设备号 */
#define MAJOR_NUM 250
static ssize_t freg_read(struct file* filp, char __user *buf, size_t count, loff_t* f_pos);
static ssize_t freg_write(struct file* filp, const char __user *buf, size_t count, loff_t* f_pos);