$ mkdir -p testprj
$ cd testprj
$ git init --bare
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
openssl s_client -connect $your_ssl_website -tlsextdebug 2>&1 | grep 'server extension' | |
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
t="${0%%`basename $0`}"; cd "$t" ; ABS_PATH=`pwd` | |
echo $ABS_PATH |
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 | |
## refernce http://www.dict.org/rfc2229.txt | |
word="$1" | |
if [ -z "$word" ]; then | |
echo "syntax: ./dict <word>" | |
exit 1 | |
fi | |
curl "dict://dict.org/d:$word" |
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
/\%xnn characters (nn range is 00-FF) | |
%s/\%xnn//g -- replace all \xnn characters (nn range is 00-FF) | |
%s/\%unnnn//g -- replace all unicode code 'nnnn' characters, (nn range is 0000-FFFF) |
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
replace | |
test-keyworkd : anything ; | |
to | |
“test-keyworkd” :“anything”, | |
regex: | |
s/^\([ \t]*\)\([a-z-]*\):[ \t]*\(.*\);/\1"\2":"\3",/g |
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" | while read fn ; do wc -l $fn ; done |
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
int led = 13; | |
void setup() | |
{ | |
Serial.begin(9600);//设置波特率为9600bps | |
pinMode(led, OUTPUT); | |
} | |
void turnon_led() { |
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
// | |
// SOIPAddress.c | |
// | |
/* | |
Copyright (c) 2013, Ben Wei | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
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
function SpentTime () { | |
this.reset = function () { | |
start = new Date(); | |
} | |
this.diff = function () { | |
var now = new Date(); | |
return (now.getTime() - start.getTime()) | |
} | |
var start = new Date(); | |
} |