See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)| type Item interface{} | |
| // ItemStack the stack of Items | |
| type ItemStack struct { | |
| items []Item | |
| lock *sync.RWMutex | |
| } | |
| // New creates a new ItemStack | |
| func New(len int, cap int) *ItemStack { |
| import time | |
| import asyncio | |
| now = lambda : time.time() | |
| start = now() | |
| async def do_some_work(x): | |
| print('Waiting: ', x) | |
| return 'Done after {}s'.format(x) |
| with concurrent.futures.ProcessPoolExecutor(max_workers=os.cpu_count()) as executor: | |
| futures_d = dict() | |
| # extract the features of anti data | |
| for anti_meta_path, anti_feature_path in meta_feature_path_map.items(): | |
| FileUtility.mkdir_p(anti_feature_path) | |
| kwargs = {'src_meta_path': anti_meta_path, | |
| 'dest_feature_path': anti_feature_path} | |
| futures_d[executor.submit(_extract_and_save_feature_from_folder, **kwargs)] = anti_meta_path |
| #ifdef WIN32 | |
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #define BUFSIZE 4096 | |
| //please refer https://msdn.microsoft.com/en-us/library/ms682499%28VS.85%29.aspx?f=255&MSPPError=-2147217396 | |
| class PopenWrapper{ |
| // gzip compress, decompress sample code useing zlib | |
| #include <string> | |
| #include "zlib.h" | |
| // https://www.zlib.net/manual.html | |
| #define GZIP_CHUNK (16384) | |
| #define GZIP_ENCODING (16) | |
| #define GZIP_DECODING (16) |
| // curl data callback function | |
| // https://curl.haxx.se/libcurl/c/CURLOPT_WRITEFUNCTION.html | |
| size_t CurlWrapper:: curlDataCallback (void *buffer, | |
| size_t size, | |
| size_t nitems, | |
| void *userdata) | |
| { | |
| if(!buffer || !userdata){ | |
| CW_DEBUG_CB("CurlWrapper::curlDataCallback", | |
| "buffer or userdata error"); |
| # remove all c files (-p means promption) | |
| find . -name "*.c" | xargs -p rm -f | |
| # try to grep 'regexp' from c files | |
| find . -name "*.c" | xargs grep 'regexp' | |
| # or | |
| find . -name "*.h"\ | |
| -o -name "*.hpp" \ | |
| -o -name "*.c" \ |