This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include "freertos/FreeRTOS.h" | |
#include "freertos/task.h" | |
#include "driver/gpio.h" | |
uint8_t test_io[] = {0, 2, 4, 5, 9, 12, 14, 17, 19, 22, 25, 27, 33}; | |
void app_main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "lwip/opt.h" | |
#if LWIP_IPV4 | |
#include "lwip/ip4_frag.h" | |
#include "lwip/def.h" | |
#include "lwip/inet_chksum.h" | |
#include "lwip/netif.h" | |
#include "lwip/stats.h" | |
#include "lwip/icmp.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#检测时间 | |
SLEEP_TIME=10 | |
#禁用阈值 | |
NO_OF_CONNECTIONS=50 | |
#禁用时长 | |
BAN_PERIOD=300 | |
#白名单 | |
IGNORE_IP_LIST=/root/autodeny/allow_ip.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
# 修改主机名称 | |
hostname: coreos-01 | |
# 将主机名称在/etc/hosts里解析为127.0.0.1 | |
manage_etc_hosts: localhost | |
# 此处的ssh_authorized_keys只对core用户生效 | |
ssh_authorized_keys: | |
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAIAQC/4ta5TeTOwx/67x50bwKnZnXe96/6WlconkfDtjugFCNvWt83IqDF3FZ2yO5Dyl2Xz80pUH0iusOc+x3t755KrQAhDTUqX/Np0z5TIYijd5N++GQIzvF0DBYAnmfG+UzaayPg+d4xkqC38YCdoKLe1FCMaV0+v5ehgx2CJ+VtCJJvMHY2Eu//oI9WL5rDo1yGwuCCjztKFtgSerLmgRD1aeL/nCZooIkFnAgO5pTvuwfQECvN2ECyMwvPk9onzbOn4vQ4yic3I79Ae0UkPoq29hZPIgvjigXhE1/hwKUqI/eiFC5aiqwaaFbr8BNvioO6Pxss7Ltm7rnHwg167wVPxEVI/PIkHMFSzCKr0hAg4V3hsAlqOlJcvXEtY2PzePiOut34pdsGSBqipxeuc6hTbkSruYb75aHioDzMLpU6sw6ePijz0WPEq2rkj1+/RyTkBuRV/VqlA9sArWpv93HKf6szGtkbiOqXCxzia+EXYaWXLH/fOO30vElC4nPvZIhCzKB+KMpya/zLr4EeUOoq1woIj+WNv+TUdN0iWMDbWx2Vs5U+bp8JDOa9iPCceTDMVFnO+69bl7yw7lygm9QhfIGo0Yb0+Ce3TJ3ZuclaZwOjfPBjcCVFpfFnT8KdHJjN87hBE9w9vwI/Nn1Kso/pzJm+Dg1RJGmtRsuWD816RJzCkf2FSsiBi8/q6jnF8GwAULqMThv5Bhbat2yMb0lXKwjYQIHZnnSlpYqbitifdh9AAJTASKkPTtrZ2YAAWi+ArgEeWQi7aQpU+vRbXng0OjLBdDZYjP2kSxv8UgFtqoRHq4bX4lxa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "LPC43xx.h" | |
void SCT_Init(void) | |
{ | |
LPC_CCU1->CLK_M4_SCT_CFG = (1 << 0); | |
LPC_SCT->CONFIG |= 1; /* 1 = 不拆分定时器 0 = 双16位定时器 */ | |
LPC_SCT->MATCHREL[0].U = 100000000; /* 匹配计数值 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <msp430.h> | |
#include <stdint.h> | |
void FlashErase(uint16_t addr) | |
{ | |
FCTL3 = FWKEY; | |
FCTL1 = FWKEY + ERASE; | |
while(FCTL3 & BUSY); | |
*(uint8_t *)addr = 0; | |
FCTL1 = FWKEY; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <syslog.h> | |
#include <sys/fcntl.h> | |
#include <sys/ioctl.h> | |
#include <linux/fb.h> | |
#include <sys/mman.h> | |
#include <bcm_host.h> | |
int process() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
import ssl | |
import json | |
import json | |
import base64 | |
table_name = '' | |
token = '' | |
ep_url = 'https://hbase-cloudtable.cn-north-1.myhuaweicloud.com/v1/929213ae947c47de866553f0c025741d' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# wget -qO- https://git.io/fjf12 | sh | |
# curl -Lso- https://git.io/fjf12 | sh | |
if [ $(id -u) -ne 0 ]; then | |
printf "Script must be run as root or sudo." | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Tencent is pleased to support the open source community by making IoT Hub available. | |
* Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. | |
* Licensed under the MIT License (the "License"); you may not use this file except in | |
* compliance with the License. You may obtain a copy of the License at | |
* http://opensource.org/licenses/MIT | |
* Unless required by applicable law or agreed to in writing, software distributed under the License is | |
* distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, |
OlderNewer