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
/* Search a wireless tool and return its path */ | |
static char * wiToolsPath(const char * tool) | |
{ | |
char * path; | |
int i, nbelems; | |
static const char * paths [] = { | |
"/sbin", | |
"/usr/sbin", | |
"/usr/local/sbin", |
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
pidstat -r -p 27427 -u 2 |
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 | |
begin=$(date +%s) | |
for ((i=0;i<1;i++));do | |
{ | |
mosquitto_pub -h 120.24.75.220 -p 61613 -u admin -P password -t test -m test | |
}& | |
done | |
wait | |
end=$(date +%s) | |
spend=$(expr $end - $begin) |
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<time.h> | |
#include<stdio.h> | |
#include<stdlib.h> | |
#define MILLION 1000000 | |
long clock_get() | |
{ | |
long ret; | |
struct timespec t; |
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
imap jj <esc> | |
colorscheme evening | |
set hlsearch | |
set incsearch | |
set autoindent |
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 | |
find ./ -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.py" -o -name "*.s" > cscope.files | |
cscope -Rbq -i cscope.files | |
ctags -R --exclude=.git |
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
############################################################################# | |
# | |
# It's the part of fos. | |
# Modified by Shanjin Yang | |
# | |
# Generic Makefile for C/C++ Program | |
# | |
# License: GPL (General Public License) | |
# Author: whyglinux <whyglinux AT gmail DOT com> | |
# Date: 2006/03/04 (version 0.1) |