Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.
This is sample code not yet complete.
- when Wifi connected need to close the softAP.
REGEDIT4 | |
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink] | |
"FontLinkControl"=dword:00004000 | |
"FontLinkDefaultChar"=dword:00003000 | |
/* 平滑化(anti-alias) */ | |
/* 如果覺得開了之後字體難看,把三個Y改成N */ | |
[HKEY_CURRENT_USER\Software\Wine\X11 Driver] | |
"ClientSideAntiAliasWithCore"="Y" | |
"ClientSideAntiAliasWithRender"="Y" | |
"ClientSideWithRender"="Y" |
#!/opt/bin/perl | |
use warnings; | |
use strict; | |
# Copyright (c) 2013 Jon Nall, STUNTAZ!!! All rights reserved. | |
# | |
# This script is intended to be run on a Synology NAS. It attempts | |
# to determine the external IP where the NAS is connected and then | |
# checks to see if it needs to update a DNS record. The server is | |
# updated if any of these are true: |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa |
#!/usr/bin/env bash | |
set -e | |
SUBJ="/C=TW/ST=Taiwan/L=TPE/O=Goooooooooogle/OU=Goooooooooogle DevOops Team/emailAddress=reboot@goooooooooogle.com" | |
ROOT_CA_NAME=GoooooooooogleRootCA | |
ROOT_CA_DAYS=$((365*4)) | |
ROOT_CA_BITS=8192 |
#include <stdio.h> | |
#include <unistd.h> | |
#include <memory.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <linux/types.h> | |
#include <linux/netlink.h> | |
#include <linux/rtnetlink.h> | |
#define BUF_SIZE 8192 |
/** | |
http://guochongxin.github.io/c/c/c++/linux/netlink/rj45/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/%E7%BD%91%E5%8D%A1/2014/12/05/tong_guo_netlink_jian_ce_wang_xian_cha_ba | |
最近有个需求需要检测RJ45网卡的网线有没有接上,而最近正在了解Netlink相关资料,刚好也看下通过Netlink可以进行检测,故在此做下粗略笔记: | |
1.首先要创建一个Netlink Socket,在用户层使用如下参数来调用socket()函数: | |
fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); |
// Netlink 是内核与用户空间进程通信的一种机制,采用与 UDP socket 非常类似的编程风格。( | |
// 与 UDP 类似,Netlink 通信也有服务器端和客户端。例如,Linux 内核作为服务器端,已经运行在那里。我们则编写 Netlink 客户端,给内核发消息,并获得我们想要的信息。 | |
/* | |
* Display all IPv4 addresses | |
*/ | |
#include <stdio.h> //printf, perror | |
#include <string.h> //memset, strlen | |
#include <stdlib.h> //exit |
/* | |
iflist.c : retrieve network interface information thru netlink sockets | |
(c) Jean Lorchat @ Internet Initiative Japan - Innovation Institute | |
v1.0 : initial version - Feb 19th 2010 | |
This file was obtained at the following address : | |
http://www.iijlab.net/~jean/iflist.c |