Skip to content

Instantly share code, notes, and snippets.

View lixingcong's full-sized avatar
😂
Face With Tears of Joy...

Lixingcong lixingcong

😂
Face With Tears of Joy...
View GitHub Profile
@lixingcong
lixingcong / README.md
Last active September 25, 2017 13:15
Xilinx SDK工程for Eclipse

Eclipse新建一个C/C++工程

工程属性:新建几个环境变量用于后面查找

# SDK_ROOT
D:\Program_Files\Xilinx\SDK\2015.4

# BOOTGEN
${SDK_ROOT}\bin\unwrapped\win64.o
@lixingcong
lixingcong / debug.cpp
Last active August 29, 2017 02:10
debug output in MFC
// use C source code, not macro
void debug_printf(char *fmt,...){
#ifdef _DEBUG
va_list ap;
va_start(ap,fmt); // #include <stdarg.h>
vprintf(fmt,ap);
va_end(ap);
#endif
}
@lixingcong
lixingcong / tree.txt
Created October 5, 2017 08:57
php source files in subfolder, using nginx
✔ [/home/ubuntu/nginx_html/]
$ tree
.
├── homepage.php
├── home.php
├── index.html
└── xxoo
├── back.php
└── backup.php
@lixingcong
lixingcong / curl-head.php
Created November 11, 2017 01:57
php-curl send HEAD request
<?php
// https://stackoverflow.com/questions/1545432/what-is-the-easiest-way-to-use-the-head-command-of-http-in-php
$dst_url='http://qq.com/';
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
@lixingcong
lixingcong / IniSettings.cpp
Created December 28, 2017 03:20
IniSettings: Windows-Like INI file storage
/*
* IniSettings.cpp
*
* Created on: 2017年12月25日下午2:55:07
* Author: lixingcong
*/
//#include "StdAfx.h"
#include "IniSettings.h"
#include <iostream>
@lixingcong
lixingcong / eclipse-201903内置emacs键位.md
Last active April 2, 2020 09:17
我的IDE键位中英对照

Eclipse内置版本

鼠标导航

操作 英文 键位偏好
Line up alt+k
Line down alt+j
Previous column ctrl+k
Next column ctrl+j
@lixingcong
lixingcong / readme.md
Created February 7, 2018 03:56
git for windows GBK乱码

mintty界面GBK

mintty界面编码改为zh-cn GBK

右击git bash标题->Options->Text
Locale选择zh_CN,Char set选择GBK

git界面GBK

@lixingcong
lixingcong / .gitignore
Last active February 26, 2018 13:02
QT下的qmake的Makefile模板
# C++ objects and libs
*.slo
*.lo
*.o
*.a
*.la
*.lai
*.so
*.dll
*.dylib
@lixingcong
lixingcong / kindle_del_sdr.py
Created February 14, 2018 14:16
kindle delete useless sdr files
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Create on: 2015年10月25日 下午4:48:30
# 说明:删除重复文件 dfs递归搜索目录判断有垃圾sdr文件
# Author:lixingcong
import os
import shutil
import time
@lixingcong
lixingcong / demo_cout.cpp
Last active February 28, 2018 07:05
C++ std cout format example
#include <iostream>
#include <iomanip>
using namespace std;
void restore_fmt(std::_Ios_Fmtflags fmt)
{
cout << "restore flag" << endl;
cout.flags(fmt);
cout << endl;