Skip to content

Instantly share code, notes, and snippets.

Avatar
🌳
Code for a Living

Tien Do tiendq

🌳
Code for a Living
View GitHub Profile
View Sourcetrail.md

Building Sourcetrail

# Boost is installed in /usr/local with `b2 install`
# llvm-project is built

cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DQt5_DIR=/Users/tiendo/Qt_5_12_3/5.12.3/clang_64/lib/cmake/Qt5 \
-DClang_DIR=/Users/tiendo/GitHub/clang-llvm/build/lib/cmake/clang -DBUILD_CXX_LANGUAGE_PACKAGE=ON ..
cmake --build .
View cpp-toolbox.md

C++ Toolbox

Libraries

fmt A modern formatting library.

googletest Google Testing and Mocking Framework.

View testdate.js
let seedDate = Date.now();
let sampleDateStrings = [];
let sampleDateValues = [];
const TOTAL_SAMPLE = 1000000;
for (let i = 0; i < TOTAL_SAMPLE; ++i) {
sampleDateStrings.push((new Date(seedDate + i)).toISOString());
sampleDateValues.push(seedDate + i);
}
View emitter.js
// Testing EventEmitter and Promise, async/await
const EventEmitter = require('events');
const http = require('http');
const fs = require('fs').promises;
const myEmitter = new EventEmitter();
async function handler3() {
console.log('handler3: myevent was fired! test Promise');
@tiendq
tiendq / install-cmake.md
Created Apr 10, 2019
Install the latest CMake on Ubuntu
View install-cmake.md
@tiendq
tiendq / delete_git_submodule.md
Created Jan 3, 2019 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.
View delete_git_submodule.md

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
View remove-git-submodule.sh
This seems to be a more modern version (copied from https://stackoverflow.com/a/36593218/2066118):
# Remove the submodule entry from .git/config
git submodule deinit -f path/to/submodule
# Remove the submodule directory from the superproject's .git/modules directory
rm -rf .git/modules/path/to/submodule
# Remove the entry in .gitmodules and remove the submodule directory located at path/to/submodule
git rm -f path/to/submodule
View git-aliases.sh
# https://github.com/mjkonarski/oh-my-git-aliases
alias g='git'
alias gst='g status'
# alias gfe='g fetch'
alias gco='g checkout'
# alias gcd='gco develop'
View best-packages.md
@tiendq
tiendq / VSCode
Last active Aug 8, 2020
VSCode.settings.json
View VSCode
/*
Atom One Dark Theme
C/C++
CMake
Debugger for Chrome
DotENV
ESLint
Markdown All in One
vscode-icons
*/