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
REGEDIT4 | |
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink] | |
"FontLinkControl"=dword:00004000 | |
"FontLinkDefaultChar"=dword:00003000 | |
/* 替換字型1 */ | |
/* 安裝Wine不會提供字型,所以需要替換字型,我以Noto Sans CJK TC Medium替換 */ | |
/* 取代字型 */ | |
/* Wine 1.1.12 打補丁後也會有亂碼,所以要修改這裡 */ | |
/* Wine 1.1.12 之前可以不用修改,改了應該也沒關係 */ | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink] |
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
/** | |
Handle multiple socket connections with select and fd_set on Linux | |
Raj Abishek <[email protected]> | |
*/ | |
#include <stdio.h> | |
#include <string.h> //strlen | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <unistd.h> //close |
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
<?php | |
/** | |
* php-ansi-color | |
* | |
* Original | |
* https://github.com/loopj/commonjs-ansi-color | |
* | |
* @code | |
* <?php | |
* require_once "ansi-color.php"; |
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 | |
# description: check cht-wifi login status, and auto login if no login. | |
# default script path: /mnt/sda1/mnt/scripts/login-cht-wifi.sh | |
# author: JustinTWD <[email protected]> | |
# date: 2016/03/12 | |
USERNAME=YOUR_CHT_ACCOUNT | |
PASSWD=YOUR_CHT_PASSWORD | |
LOGFILE=/mnt/sda1/log/cht-wifi.log | |
TMPSESSION=/tmp/cht_session.tmp |
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
<?php | |
/** | |
* CIDR.php | |
* | |
* Utility Functions for IPv4 ip addresses. | |
* Supports PHP 5.3+ (32 & 64 bit) | |
* @author Jonavon Wilcox <[email protected]> | |
* @revision Carlos Guimarães <[email protected]> | |
* @version Wed Mar 12 13:00:00 EDT 2014 | |
*/ |
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
/* | |
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 |
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
/** | |
* Shows the network interfaces using RTNETLINK | |
* | |
* @author: Asanga Udugama <[email protected]> | |
* @modified: Stian Skjelstad <[email protected]> | |
* @date: 19-jul-2005 | |
* | |
*/ | |
#include <arpa/inet.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
// 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 |
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
/** | |
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); |
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 <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 |
NewerOlder