Skip to content

Instantly share code, notes, and snippets.

View elinx's full-sized avatar
🤖

Elinx elinx

🤖
View GitHub Profile
@elinx
elinx / param_pack_traverse.cpp
Last active April 11, 2021 04:38
traverse variadic template pramater pack in forward and backward mode
#include <vector>
#include <list>
#include <iostream>
#include <iterator>
#include <algorithm>
#include <set>
#include <optional>
#include <tuple>
template <typename T>
@elinx
elinx / CMake_Python
Created April 29, 2018 14:08
CMake Specify Python Headers and Library
cmake .. -DPYTHON_INCLUDE_DIR=/home/xilinxing/software/anaconda3/envs/py35/include/python3.5m/ -DPYTHON_LIBRARY=/home/xilinxing/software/anaconda3/envs/py35/lib
# how to find correct python directory
# python
>>> from distutils import sysconfig
>>> print(sysconfig.get_python_inc())
>>> print(sysconfig.get_python_lib())
@elinx
elinx / s.md
Last active February 4, 2018 01:41
spacemacs for c/c++ trouble shooting
  • clang completation don't work after enable c-c++ layer. see the message buffer and found that clang exectuable can't be found, use the following commands:
sudo ln -s /usr/bin/clang-5.0 /usr/bin/clang
sudo ln -s /usr/bin/clang++-5.0 /usr/bin/clang++
  • snippets can't pop up after enable auto-complete layer, search the .emacs.d directory and found no snippet files at all, solve this by downlaod snippets manual use the following commands:
cd ~/.emacs.d/elpa/yasnippet-20180111.1533/snippets
git clone https://github.com/AndreaCrotti/yasnippet-snippets.git
@elinx
elinx / clean_vsprojects.ps1
Created June 21, 2015 01:56
Clean Visual Studio projects
# using this script clean visual studio projects folder, save storage space
get-childitem -r -path D:\vsprojects -filter *Debug* | remove-item -force -recurse
get-childitem -r -path D:\vsprojects -filter *Release* | remove-item -force -recurse
get-childitem -r -path D:\vsprojects -filter *ipch* | remove-item -force -recurse
get-childitem -r -path D:\vsprojects -filter *.sdf | remove-item -force -recurse
@elinx
elinx / remove_folder.ps1
Last active August 29, 2015 14:23
Remove sub-folders(with or without content) in a specific directory using PowerShell(windows)
get-childitem -r -path D:\vsprojects -filter *Debug* | remove-item -force -recurse
# this will remove all debug folders of the visual studio projects
# ref1: http://ss64.com/ps/remove-item.html
# ref2: http://serverfault.com/questions/271548/delete-a-sub-folder-with-specific-name-from-all-sub-folders